src/events/SDL_keyboard.c
changeset 5220 1fbe1c202501
parent 5219 c1a92e61907d
child 5262 b530ef003506
     1.1 --- a/src/events/SDL_keyboard.c	Mon Feb 07 09:42:08 2011 -0800
     1.2 +++ b/src/events/SDL_keyboard.c	Mon Feb 07 10:40:21 2011 -0800
     1.3 @@ -39,12 +39,12 @@
     1.4      SDL_Window *focus;
     1.5      Uint16 modstate;
     1.6      Uint8 keystate[SDL_NUM_SCANCODES];
     1.7 -    SDL_Key keymap[SDL_NUM_SCANCODES];
     1.8 +    SDL_Keycode keymap[SDL_NUM_SCANCODES];
     1.9  };
    1.10  
    1.11  static SDL_Keyboard SDL_keyboard;
    1.12  
    1.13 -static const SDL_Key SDL_default_keymap[SDL_NUM_SCANCODES] = {
    1.14 +static const SDL_Keycode SDL_default_keymap[SDL_NUM_SCANCODES] = {
    1.15      0, 0, 0, 0,
    1.16      'a',
    1.17      'b',
    1.18 @@ -572,13 +572,13 @@
    1.19  }
    1.20  
    1.21  void
    1.22 -SDL_GetDefaultKeymap(SDL_Key * keymap)
    1.23 +SDL_GetDefaultKeymap(SDL_Keycode * keymap)
    1.24  {
    1.25      SDL_memcpy(keymap, SDL_default_keymap, sizeof(SDL_default_keymap));
    1.26  }
    1.27  
    1.28  void
    1.29 -SDL_SetKeymap(int start, SDL_Key * keys, int length)
    1.30 +SDL_SetKeymap(int start, SDL_Keycode * keys, int length)
    1.31  {
    1.32      SDL_Keyboard *keyboard = &SDL_keyboard;
    1.33  
    1.34 @@ -832,7 +832,7 @@
    1.35      return keyboard->keystate;
    1.36  }
    1.37  
    1.38 -SDL_Mod
    1.39 +SDL_Keymod
    1.40  SDL_GetModState(void)
    1.41  {
    1.42      SDL_Keyboard *keyboard = &SDL_keyboard;
    1.43 @@ -841,14 +841,14 @@
    1.44  }
    1.45  
    1.46  void
    1.47 -SDL_SetModState(SDL_Mod modstate)
    1.48 +SDL_SetModState(SDL_Keymod modstate)
    1.49  {
    1.50      SDL_Keyboard *keyboard = &SDL_keyboard;
    1.51  
    1.52      keyboard->modstate = modstate;
    1.53  }
    1.54  
    1.55 -SDL_Key
    1.56 +SDL_Keycode
    1.57  SDL_GetKeyFromScancode(SDL_Scancode scancode)
    1.58  {
    1.59      SDL_Keyboard *keyboard = &SDL_keyboard;
    1.60 @@ -857,7 +857,7 @@
    1.61  }
    1.62  
    1.63  SDL_Scancode
    1.64 -SDL_GetScancodeFromKey(SDL_Key key)
    1.65 +SDL_GetScancodeFromKey(SDL_Keycode key)
    1.66  {
    1.67      SDL_Keyboard *keyboard = &SDL_keyboard;
    1.68      SDL_Scancode scancode;
    1.69 @@ -883,7 +883,7 @@
    1.70  }
    1.71  
    1.72  const char *
    1.73 -SDL_GetKeyName(SDL_Key key)
    1.74 +SDL_GetKeyName(SDL_Keycode key)
    1.75  {
    1.76      static char name[8];
    1.77      char *end;