Ignore:
Timestamp:
Oct 12, 2012, 1:04:13 AM (10 years ago)
Author:
sam
Message:

input: add the Keyboard abstraction object type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/platform/sdl/sdlinput.cpp

    r1808 r2009  
    5656{
    5757#if defined USE_SDL
     58    /* Enable Unicode translation of keyboard events */
     59    SDL_EnableUNICODE(1);
     60
    5861    SDL_Init(SDL_INIT_TIMER | SDL_INIT_JOYSTICK);
    5962
     
    162165#if 0
    163166        case SDL_KEYDOWN:
    164             Input::KeyPressed(event.key.keysym.sym, seconds);
     167            if (event.key.keysym.unicode)
     168                fprintf(stderr, "%c (0x%04X)\n", event.key.keysym.unicode, event.key.keysym.unicode);
    165169            break;
    166170#endif
Note: See TracChangeset for help on using the changeset viewer.