Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoakeyboard.m @ 2273:a25bc0f79557
Fixed bug #471
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 21 Aug 2007 06:54:07 +0000 |
parents | d5a11262f067 |
children | f629d566ec6b |
comparison
equal
deleted
inserted
replaced
2272:25a87553a59d | 2273:a25bc0f79557 |
---|---|
378 /* FIXME CW 2007-08-16: only send those events to the field editor for which we actually want text events, not e.g. esc or function keys. Arrow keys in particular seem to produce crashes sometimes. */ | 378 /* FIXME CW 2007-08-16: only send those events to the field editor for which we actually want text events, not e.g. esc or function keys. Arrow keys in particular seem to produce crashes sometimes. */ |
379 [data->fieldEdit interpretKeyEvents:[NSArray arrayWithObject:event]]; | 379 [data->fieldEdit interpretKeyEvents:[NSArray arrayWithObject:event]]; |
380 text = [[event characters] UTF8String]; | 380 text = [[event characters] UTF8String]; |
381 if(text && *text) { | 381 if(text && *text) { |
382 SDL_SendKeyboardText(data->keyboard, text); | 382 SDL_SendKeyboardText(data->keyboard, text); |
383 [data->fieldEdit setString:@""]; | |
383 } | 384 } |
384 } | 385 } |
385 break; | 386 break; |
386 case NSKeyUp: | 387 case NSKeyUp: |
387 SDL_SendKeyboardKey(data->keyboard, SDL_RELEASED, (Uint8)scancode, physicalKey); | 388 SDL_SendKeyboardKey(data->keyboard, SDL_RELEASED, (Uint8)scancode, physicalKey); |