hedgewars/hwengine.pas
changeset 10836 0b415bc2e0eb
parent 10633 2f062fac5791
child 10886 99273b7afbff
child 11025 999afa63035f
equal deleted inserted replaced
10835:8ac09cd322b7 10836:0b415bc2e0eb
   171 {$IFDEF SDL2}
   171 {$IFDEF SDL2}
   172                 SDL_KEYDOWN:
   172                 SDL_KEYDOWN:
   173                     if GameState = gsChat then
   173                     if GameState = gsChat then
   174                         begin
   174                         begin
   175                     // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3
   175                     // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3
   176                         KeyPressChat(SDL_GetKeyFromScancode(event.key.keysym.sym), event.key.keysym.sym); //TODO correct for keymodifiers
   176                         KeyPressChat(SDL_GetKeyFromScancode(event.key.keysym.sym), event.key.keysym.sym, event.key.keysym.modifier);
   177                         end
   177                         end
   178                     else
   178                     else
   179                         if GameState >= gsGame then ProcessKey(event.key);
   179                         if GameState >= gsGame then ProcessKey(event.key);
   180                 SDL_KEYUP:
   180                 SDL_KEYUP:
   181                     if (GameState <> gsChat) and (GameState >= gsGame) then
   181                     if (GameState <> gsChat) and (GameState >= gsGame) then
   217                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   217                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   218 {$ENDIF}
   218 {$ENDIF}
   219 {$ELSE}
   219 {$ELSE}
   220                 SDL_KEYDOWN:
   220                 SDL_KEYDOWN:
   221                     if GameState = gsChat then
   221                     if GameState = gsChat then
   222                         KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym)
   222                         KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym, event.key.keysym.modifier)
   223                     else
   223                     else
   224                         if GameState >= gsGame then ProcessKey(event.key);
   224                         if GameState >= gsGame then ProcessKey(event.key);
   225                 SDL_KEYUP:
   225                 SDL_KEYUP:
   226                     if (GameState <> gsChat) and (GameState >= gsGame) then
   226                     if (GameState <> gsChat) and (GameState >= gsGame) then
   227                         ProcessKey(event.key);
   227                         ProcessKey(event.key);