SDLK_DELETE should probably be SDLK_BACKSPACE on iOS.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 02 Oct 2013 22:18:04 -0400
changeset 7774c5d6c8c001be
parent 7773 4af50952c730
child 7775 dad9001a9fc7
SDLK_DELETE should probably be SDLK_BACKSPACE on iOS.

The key on the software keyboard works like backspace, at least. Not sure
what happens with a bluetooth keyboard here.
src/video/uikit/SDL_uikitview.m
src/video/uikit/keyinfotable.h
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Wed Oct 02 22:16:11 2013 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Wed Oct 02 22:18:04 2013 -0400
     1.3 @@ -246,8 +246,8 @@
     1.4  {
     1.5      if ([string length] == 0) {
     1.6          /* it wants to replace text with nothing, ie a delete */
     1.7 -        SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_DELETE);
     1.8 -        SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_DELETE);
     1.9 +        SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_BACKSPACE);
    1.10 +        SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_BACKSPACE);
    1.11      }
    1.12      else {
    1.13          /* go through all the characters in the string we've been sent
     2.1 --- a/src/video/uikit/keyinfotable.h	Wed Oct 02 22:16:11 2013 -0400
     2.2 +++ b/src/video/uikit/keyinfotable.h	Wed Oct 02 22:18:04 2013 -0400
     2.3 @@ -166,7 +166,7 @@
     2.4  /*  124 */{    SDL_SCANCODE_BACKSLASH, KMOD_SHIFT },    /* plus shift modifier '|' */
     2.5  /*  125 */{    SDL_SCANCODE_RIGHTBRACKET, KMOD_SHIFT },    /* plus shift modifier '}' */
     2.6  /*  126 */{    SDL_SCANCODE_GRAVE, KMOD_SHIFT },         /* plus shift modifier '~' */
     2.7 -/*  127 */{    SDL_SCANCODE_DELETE, KMOD_SHIFT }
     2.8 +/*  127 */{    SDL_SCANCODE_BACKSPACE, KMOD_SHIFT }
     2.9  };
    2.10  
    2.11  #endif /* UIKitKeyInfo */