Commit 64ac3260 authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #1025 (iphone keyboard doesn't send 'return' and 'backspace' events)

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

i have attached an updated patch that fixes this behaviour
parent 3752cf58
...@@ -298,6 +298,7 @@ ...@@ -298,6 +298,7 @@
/* Terminates the editing session */ /* Terminates the editing session */
- (BOOL)textFieldShouldReturn:(UITextField*)_textField { - (BOOL)textFieldShouldReturn:(UITextField*)_textField {
SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN);
[self hideKeyboard]; [self hideKeyboard];
return YES; return YES;
} }
......
...@@ -54,7 +54,7 @@ static UIKitKeyInfo unicharToUIKeyInfoTable[] = { ...@@ -54,7 +54,7 @@ static UIKitKeyInfo unicharToUIKeyInfoTable[] = {
/* 10 */ { SDL_SCANCODE_UNKNOWN, 0 }, /* 10 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 11 */ { SDL_SCANCODE_UNKNOWN, 0 }, /* 11 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 12 */ { SDL_SCANCODE_UNKNOWN, 0 }, /* 12 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 13 */ { SDL_SCANCODE_UNKNOWN, 0 }, /* 13 */ { SDL_SCANCODE_RETURN, 0 },
/* 14 */ { SDL_SCANCODE_UNKNOWN, 0 }, /* 14 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 15 */ { SDL_SCANCODE_UNKNOWN, 0 }, /* 15 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 16 */ { SDL_SCANCODE_UNKNOWN, 0 }, /* 16 */ { SDL_SCANCODE_UNKNOWN, 0 },
...@@ -137,7 +137,7 @@ static UIKitKeyInfo unicharToUIKeyInfoTable[] = { ...@@ -137,7 +137,7 @@ static UIKitKeyInfo unicharToUIKeyInfoTable[] = {
/* 93 */ { SDL_SCANCODE_RIGHTBRACKET, 0 }, /* 93 */ { SDL_SCANCODE_RIGHTBRACKET, 0 },
/* 94 */ { SDL_SCANCODE_6, KMOD_SHIFT }, /* plus shift modifier '^' */ /* 94 */ { SDL_SCANCODE_6, KMOD_SHIFT }, /* plus shift modifier '^' */
/* 95 */ { SDL_SCANCODE_MINUS, 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 }, /* 97 */ { SDL_SCANCODE_A, 0 },
/* 98 */ { SDL_SCANCODE_B, 0 }, /* 98 */ { SDL_SCANCODE_B, 0 },
/* 99 */ { SDL_SCANCODE_C, 0 }, /* 99 */ { SDL_SCANCODE_C, 0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment