Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #1025 (iphone keyboard doesn't send 'return' and 'backspace…
Browse files Browse the repository at this point in the history
…' events)

 Vittorio Giovara      2011-02-01 02:25:48 PST

i have attached an updated patch that fixes this behaviour
  • Loading branch information
slouken committed Feb 1, 2011
1 parent 057d800 commit fa83b0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/video/uikit/SDL_uikitview.m
Expand Up @@ -298,6 +298,7 @@ - (BOOL)textField:(UITextField *)_textField shouldChangeCharactersInRange:(NSRan

/* Terminates the editing session */
- (BOOL)textFieldShouldReturn:(UITextField*)_textField {
SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN);
[self hideKeyboard];
return YES;
}
Expand Down
4 changes: 2 additions & 2 deletions src/video/uikit/keyinfotable.h
Expand Up @@ -54,7 +54,7 @@ static UIKitKeyInfo unicharToUIKeyInfoTable[] = {
/* 10 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 11 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 12 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 13 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 13 */ { SDL_SCANCODE_RETURN, 0 },
/* 14 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 15 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 16 */ { SDL_SCANCODE_UNKNOWN, 0 },
Expand Down Expand Up @@ -137,7 +137,7 @@ static UIKitKeyInfo unicharToUIKeyInfoTable[] = {
/* 93 */ { SDL_SCANCODE_RIGHTBRACKET, 0 },
/* 94 */ { SDL_SCANCODE_6, KMOD_SHIFT }, /* plus shift modifier '^' */
/* 95 */ { SDL_SCANCODE_MINUS, KMOD_SHIFT }, /* plus shift modifier '_' */
/* 96 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* '`'
/* 96 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* '`' */
/* 97 */ { SDL_SCANCODE_A, 0 },
/* 98 */ { SDL_SCANCODE_B, 0 },
/* 99 */ { SDL_SCANCODE_C, 0 },
Expand Down

0 comments on commit fa83b0e

Please sign in to comment.