Skip to content

Commit

Permalink
SDLK_DELETE should probably be SDLK_BACKSPACE on iOS.
Browse files Browse the repository at this point in the history
The key on the software keyboard works like backspace, at least. Not sure
 what happens with a bluetooth keyboard here.
  • Loading branch information
icculus committed Oct 3, 2013
1 parent 958640e commit ce45fa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/video/uikit/SDL_uikitview.m
Expand Up @@ -246,8 +246,8 @@ - (BOOL)textField:(UITextField *)_textField shouldChangeCharactersInRange:(NSRan
{
if ([string length] == 0) {
/* it wants to replace text with nothing, ie a delete */
SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_DELETE);
SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_DELETE);
SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_BACKSPACE);
SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_BACKSPACE);
}
else {
/* go through all the characters in the string we've been sent
Expand Down
2 changes: 1 addition & 1 deletion src/video/uikit/keyinfotable.h
Expand Up @@ -166,7 +166,7 @@ static UIKitKeyInfo unicharToUIKeyInfoTable[] = {
/* 124 */{ SDL_SCANCODE_BACKSLASH, KMOD_SHIFT }, /* plus shift modifier '|' */
/* 125 */{ SDL_SCANCODE_RIGHTBRACKET, KMOD_SHIFT }, /* plus shift modifier '}' */
/* 126 */{ SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* plus shift modifier '~' */
/* 127 */{ SDL_SCANCODE_DELETE, KMOD_SHIFT }
/* 127 */{ SDL_SCANCODE_BACKSPACE, KMOD_SHIFT }
};

#endif /* UIKitKeyInfo */
Expand Down

0 comments on commit ce45fa2

Please sign in to comment.