diff src/events/SDL_keyboard.c @ 5225:1fbe1c202501

Renamed SDL_Key to SDL_Keycode to clarify terminology.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 07 Feb 2011 10:40:21 -0800
parents c1a92e61907d
children b530ef003506
line wrap: on
line diff
--- a/src/events/SDL_keyboard.c	Mon Feb 07 09:42:08 2011 -0800
+++ b/src/events/SDL_keyboard.c	Mon Feb 07 10:40:21 2011 -0800
@@ -39,12 +39,12 @@
     SDL_Window *focus;
     Uint16 modstate;
     Uint8 keystate[SDL_NUM_SCANCODES];
-    SDL_Key keymap[SDL_NUM_SCANCODES];
+    SDL_Keycode keymap[SDL_NUM_SCANCODES];
 };
 
 static SDL_Keyboard SDL_keyboard;
 
-static const SDL_Key SDL_default_keymap[SDL_NUM_SCANCODES] = {
+static const SDL_Keycode SDL_default_keymap[SDL_NUM_SCANCODES] = {
     0, 0, 0, 0,
     'a',
     'b',
@@ -572,13 +572,13 @@
 }
 
 void
-SDL_GetDefaultKeymap(SDL_Key * keymap)
+SDL_GetDefaultKeymap(SDL_Keycode * keymap)
 {
     SDL_memcpy(keymap, SDL_default_keymap, sizeof(SDL_default_keymap));
 }
 
 void
-SDL_SetKeymap(int start, SDL_Key * keys, int length)
+SDL_SetKeymap(int start, SDL_Keycode * keys, int length)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
 
@@ -832,7 +832,7 @@
     return keyboard->keystate;
 }
 
-SDL_Mod
+SDL_Keymod
 SDL_GetModState(void)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
@@ -841,14 +841,14 @@
 }
 
 void
-SDL_SetModState(SDL_Mod modstate)
+SDL_SetModState(SDL_Keymod modstate)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
 
     keyboard->modstate = modstate;
 }
 
-SDL_Key
+SDL_Keycode
 SDL_GetKeyFromScancode(SDL_Scancode scancode)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
@@ -857,7 +857,7 @@
 }
 
 SDL_Scancode
-SDL_GetScancodeFromKey(SDL_Key key)
+SDL_GetScancodeFromKey(SDL_Keycode key)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
     SDL_Scancode scancode;
@@ -883,7 +883,7 @@
 }
 
 const char *
-SDL_GetKeyName(SDL_Key key)
+SDL_GetKeyName(SDL_Keycode key)
 {
     static char name[8];
     char *end;