hedgewars/hwengine.pas
changeset 8742 b7b8bd398c1b
parent 8615 a4cb6168016e
child 8833 c13ebed437cb
child 8835 01bcf9ea68c1
equal deleted inserted replaced
8741:c98ec6865631 8742:b7b8bd398c1b
   165         begin
   165         begin
   166             case event.type_ of
   166             case event.type_ of
   167 {$IFDEF SDL13}
   167 {$IFDEF SDL13}
   168                 SDL_KEYDOWN:
   168                 SDL_KEYDOWN:
   169                     if GameState = gsChat then
   169                     if GameState = gsChat then
       
   170                         begin
   170                     // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3
   171                     // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3
   171                         KeyPressChat(SDL_GetKeyFromScancode(event.key.keysym.sym))//TODO correct for keymodifiers
   172                         KeyPressChat(SDL_GetKeyFromScancode(event.key.keysym.sym, event.key.keysym.sym)//TODO correct for keymodifiers
       
   173                         end
   172                     else
   174                     else
   173                         ProcessKey(event.key);
   175                         ProcessKey(event.key);
   174                 SDL_KEYUP:
   176                 SDL_KEYUP:
   175                     if GameState <> gsChat then
   177                     if GameState <> gsChat then
   176                         ProcessKey(event.key);
   178                         ProcessKey(event.key);
   210                 SDL_FINGERUP:
   212                 SDL_FINGERUP:
   211                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   213                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   212 {$ELSE}
   214 {$ELSE}
   213                 SDL_KEYDOWN:
   215                 SDL_KEYDOWN:
   214                     if GameState = gsChat then
   216                     if GameState = gsChat then
   215                         KeyPressChat(event.key.keysym.unicode)
   217                         KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym)
   216                     else
   218                     else
   217                         ProcessKey(event.key);
   219                         ProcessKey(event.key);
   218                 SDL_KEYUP:
   220                 SDL_KEYUP:
   219                     if GameState <> gsChat then
   221                     if GameState <> gsChat then
   220                         ProcessKey(event.key);
   222                         ProcessKey(event.key);