changeset 5083:25d4feb7c127

Renamed SDL_keysym to SDL_KeySym Renamed SDL_scancode to SDL_ScanCode Added #defines to SDL_compat.h
author krogoway
date Mon, 24 Jan 2011 13:47:35 -0600
parents de59e0218aa2
children ac2c68eb1bb9
files Xcode-iPhoneOS/Demos/src/keyboard.c include/SDL_compat.h include/SDL_events.h include/SDL_keyboard.h include/SDL_scancode.h src/events/SDL_keyboard.c src/events/SDL_keyboard_c.h src/events/scancodes_darwin.h src/events/scancodes_linux.h src/events/scancodes_windows.h src/events/scancodes_xfree86.h src/video/android/SDL_androidkeyboard.c src/video/bwindow/SDL_BWin.h src/video/cocoa/SDL_cocoakeyboard.m src/video/directfb/SDL_DirectFB_events.c src/video/photon/SDL_photon.c src/video/photon/SDL_photon_input.c src/video/photon/SDL_photon_input.h src/video/riscos/SDL_riscosevents.c src/video/uikit/SDL_uikitview.m src/video/uikit/keyinfotable.h src/video/windows/SDL_windowskeyboard.c src/video/windows/SDL_windowsvideo.h src/video/x11/SDL_x11events.c src/video/x11/SDL_x11keyboard.c src/video/x11/SDL_x11video.h test/checkkeys.c test/testkeys.c test/testwm.c
diffstat 29 files changed, 84 insertions(+), 81 deletions(-) [+]
line wrap: on
line diff
--- a/Xcode-iPhoneOS/Demos/src/keyboard.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/Xcode-iPhoneOS/Demos/src/keyboard.c	Mon Jan 24 13:47:35 2011 -0600
@@ -34,7 +34,7 @@
 */
 typedef struct
 {
-    SDL_scancode scancode;      /* scancode of the key we want to map */
+    SDL_ScanCode scancode;      /* scancode of the key we want to map */
     int allow_no_mod;           /* is the map valid if the key has no modifiers? */
     SDLMod mod;                 /* what modifiers are allowed for the mapping */
     int index;                  /* what index in the font does the scancode map to */
@@ -103,7 +103,7 @@
 };
 
 /*
-	This function maps an SDL_keysym to an index in the bitmap font.
+	This function maps an SDL_KeySym to an index in the bitmap font.
 	It does so by scanning through the font mapping table one entry
 	at a time.
  
@@ -113,7 +113,7 @@
 	If there is no entry for the key, -1 is returned
 */
 int
-keyToIndex(SDL_keysym key)
+keyToIndex(SDL_KeySym key)
 {
     int i, index = -1;
     for (i = 0; i < TABLE_SIZE; i++) {
@@ -240,7 +240,7 @@
     SDL_Window *window;
     SDL_Event event;            /* last event received */
     SDLMod mod;                 /* key modifiers of last key we pushed */
-    SDL_scancode scancode;      /* scancode of last key we pushed */
+    SDL_ScanCode scancode;      /* scancode of last key we pushed */
 
     if (SDL_Init(SDL_INIT_VIDEO) < 0) {
         printf("Error initializing SDL: %s", SDL_GetError());
--- a/include/SDL_compat.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/include/SDL_compat.h	Mon Jan 24 13:47:35 2011 -0600
@@ -223,6 +223,9 @@
  */
 /*@{*/
 
+#define SDL_keysym		SDL_KeySym
+#define SDL_scancode	SDL_ScanCode
+
 /** 
  *  \name Renamed keys
  *
--- a/include/SDL_events.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/include/SDL_events.h	Mon Jan 24 13:47:35 2011 -0600
@@ -151,7 +151,7 @@
     Uint8 repeat;       /**< Non-zero if this is a key repeat */
     Uint8 padding2;
     Uint8 padding3;
-    SDL_keysym keysym;  /**< The key that was pressed or released */
+    SDL_KeySym keysym;  /**< The key that was pressed or released */
 } SDL_KeyboardEvent;
 
 #define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
--- a/include/SDL_keyboard.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/include/SDL_keyboard.h	Mon Jan 24 13:47:35 2011 -0600
@@ -45,13 +45,13 @@
 /**
  *  \brief The SDL keysym structure, used in key events.
  */
-typedef struct SDL_keysym
+typedef struct SDL_KeySym
 {
-    SDL_scancode scancode;      /**< SDL physical key code - see ::SDL_scancode for details */
+    SDL_ScanCode scancode;      /**< SDL physical key code - see ::SDL_ScanCode for details */
     SDLKey sym;                 /**< SDL virtual key code - see ::SDLKey for details */
     Uint16 mod;                 /**< current key modifiers */
     Uint32 unicode;             /**< \deprecated use SDL_TextInputEvent instead */
-} SDL_keysym;
+} SDL_KeySym;
 
 /* Function prototypes */
 
@@ -65,7 +65,7 @@
  *  
  *  \param numkeys if non-NULL, receives the length of the returned array.
  *  
- *  \return An array of key states. Indexes into this array are obtained by using ::SDL_scancode values.
+ *  \return An array of key states. Indexes into this array are obtained by using ::SDL_ScanCode values.
  *  
  *  \b Example:
  *  \code
@@ -97,17 +97,17 @@
  *  
  *  \sa SDL_GetKeyName()
  */
-extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_scancode scancode);
+extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_ScanCode scancode);
 
 /**
  *  \brief Get the scancode corresponding to the given key code according to the
  *         current keyboard layout.
  *  
- *  See ::SDL_scancode for details.
+ *  See ::SDL_ScanCode for details.
  *  
  *  \sa SDL_GetScancodeName()
  */
-extern DECLSPEC SDL_scancode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
+extern DECLSPEC SDL_ScanCode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
 
 /**
  *  \brief Get a human-readable name for a scancode.
@@ -117,9 +117,9 @@
  *          copy it.  If the scancode doesn't have a name, this function returns
  *          an empty string ("").
  *
- *  \sa SDL_scancode
+ *  \sa SDL_ScanCode
  */
-extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_scancode
+extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_ScanCode
                                                         scancode);
 
 /**
--- a/include/SDL_scancode.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/include/SDL_scancode.h	Mon Jan 24 13:47:35 2011 -0600
@@ -35,7 +35,7 @@
  *  \brief The SDL keyboard scancode representation.
  *  
  *  Values of this type are used to represent keyboard keys, among other places
- *  in the \link SDL_keysym::scancode key.keysym.scancode \endlink field of the
+ *  in the \link SDL_KeySym::scancode key.keysym.scancode \endlink field of the
  *  SDL_Event structure.
  *  
  *  The values in this enumeration are based on the USB usage page standard:
@@ -392,7 +392,7 @@
 
     SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes 
                                  for array bounds */
-} SDL_scancode;
+} SDL_ScanCode;
 
 #endif /* _SDL_scancode_h */
 
--- a/src/events/SDL_keyboard.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/events/SDL_keyboard.c	Mon Jan 24 13:47:35 2011 -0600
@@ -562,7 +562,7 @@
 SDL_ResetKeyboard(void)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
-    SDL_scancode scancode;
+    SDL_ScanCode scancode;
 
     for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) {
         if (keyboard->keystate[scancode] == SDL_PRESSED) {
@@ -590,7 +590,7 @@
 }
 
 void
-SDL_SetScancodeName(SDL_scancode scancode, const char *name)
+SDL_SetScancodeName(SDL_ScanCode scancode, const char *name)
 {
     SDL_scancode_names[scancode] = name;
 }
@@ -638,7 +638,7 @@
 }
 
 int
-SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode)
+SDL_SendKeyboardKey(Uint8 state, SDL_ScanCode scancode)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
     int posted;
@@ -849,18 +849,18 @@
 }
 
 SDLKey
-SDL_GetKeyFromScancode(SDL_scancode scancode)
+SDL_GetKeyFromScancode(SDL_ScanCode scancode)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
 
     return keyboard->keymap[scancode];
 }
 
-SDL_scancode
+SDL_ScanCode
 SDL_GetScancodeFromKey(SDLKey key)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;
-    SDL_scancode scancode;
+    SDL_ScanCode scancode;
 
     for (scancode = SDL_SCANCODE_UNKNOWN; scancode < SDL_NUM_SCANCODES;
          ++scancode) {
@@ -872,7 +872,7 @@
 }
 
 const char *
-SDL_GetScancodeName(SDL_scancode scancode)
+SDL_GetScancodeName(SDL_ScanCode scancode)
 {
     const char *name = SDL_scancode_names[scancode];
 
@@ -890,7 +890,7 @@
 
     if (key & SDLK_SCANCODE_MASK) {
         return
-            SDL_GetScancodeName((SDL_scancode) (key & ~SDLK_SCANCODE_MASK));
+            SDL_GetScancodeName((SDL_ScanCode) (key & ~SDLK_SCANCODE_MASK));
     }
 
     switch (key) {
--- a/src/events/SDL_keyboard_c.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/events/SDL_keyboard_c.h	Mon Jan 24 13:47:35 2011 -0600
@@ -43,13 +43,13 @@
    name. Encoded as UTF-8. The string is not copied, thus the pointer given to
    this function must stay valid forever (or at least until the call to
    VideoQuit()). */
-extern void SDL_SetScancodeName(SDL_scancode scancode, const char *name);
+extern void SDL_SetScancodeName(SDL_ScanCode scancode, const char *name);
 
 /* Set the keyboard focus window */
 extern void SDL_SetKeyboardFocus(SDL_Window * window);
 
 /* Send a keyboard key event */
-extern int SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode);
+extern int SDL_SendKeyboardKey(Uint8 state, SDL_ScanCode scancode);
 
 /* Send keyboard text input */
 extern int SDL_SendKeyboardText(const char *text);
--- a/src/events/scancodes_darwin.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/events/scancodes_darwin.h	Mon Jan 24 13:47:35 2011 -0600
@@ -27,7 +27,7 @@
    - experimentation on various ADB and USB ISO keyboards and one ADB ANSI keyboard
 */
 /* *INDENT-OFF* */
-static const SDL_scancode darwin_scancode_table[] = {
+static const SDL_ScanCode darwin_scancode_table[] = {
     /*   0 */   SDL_SCANCODE_A,
     /*   1 */   SDL_SCANCODE_S,
     /*   2 */   SDL_SCANCODE_D,
--- a/src/events/scancodes_linux.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/events/scancodes_linux.h	Mon Jan 24 13:47:35 2011 -0600
@@ -26,7 +26,7 @@
    - Linux kernel source input.h
 */
 /* *INDENT-OFF* */
-static SDL_scancode const linux_scancode_table[] = {
+static SDL_ScanCode const linux_scancode_table[] = {
     /*  0 */    SDL_SCANCODE_UNKNOWN,
     /*  1 */    SDL_SCANCODE_ESCAPE,
     /*  2 */    SDL_SCANCODE_1,
--- a/src/events/scancodes_windows.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/events/scancodes_windows.h	Mon Jan 24 13:47:35 2011 -0600
@@ -26,7 +26,7 @@
    - msdn.microsoft.com
 */
 /* *INDENT-OFF* */
-static const SDL_scancode windows_scancode_table[] = {
+static const SDL_ScanCode windows_scancode_table[] = {
     /*  0, 0x00 */      SDL_SCANCODE_UNKNOWN,
     /*  1, 0x01 */      SDL_SCANCODE_UNKNOWN,
     /*  2, 0x02 */      SDL_SCANCODE_UNKNOWN,
--- a/src/events/scancodes_xfree86.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/events/scancodes_xfree86.h	Mon Jan 24 13:47:35 2011 -0600
@@ -26,7 +26,7 @@
    - atKeyNames.h from XFree86 source code
 */
 /* *INDENT-OFF* */
-static const SDL_scancode xfree86_scancode_table[] = {
+static const SDL_ScanCode xfree86_scancode_table[] = {
     /*  0 */    SDL_SCANCODE_UNKNOWN,
     /*  1 */    SDL_SCANCODE_ESCAPE,
     /*  2 */    SDL_SCANCODE_1,
@@ -177,7 +177,7 @@
 };
 
 /* for wireless usb keyboard (manufacturer TRUST) without numpad. */
-static const SDL_scancode xfree86_scancode_table2[] = {
+static const SDL_ScanCode xfree86_scancode_table2[] = {
     /*  0 */    SDL_SCANCODE_UNKNOWN,
     /*  1 */    SDL_SCANCODE_ESCAPE,
     /*  2 */    SDL_SCANCODE_1,
--- a/src/video/android/SDL_androidkeyboard.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/android/SDL_androidkeyboard.c	Mon Jan 24 13:47:35 2011 -0600
@@ -37,7 +37,7 @@
     SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES);
 }
 
-static SDL_scancode Android_Keycodes[] = {
+static SDL_ScanCode Android_Keycodes[] = {
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_LEFT */
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_RIGHT */
@@ -151,10 +151,10 @@
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_MODE */
 };
 
-static SDL_scancode
+static SDL_ScanCode
 TranslateKeycode(int keycode)
 {
-    SDL_scancode scancode = SDL_SCANCODE_UNKNOWN;
+    SDL_ScanCode scancode = SDL_SCANCODE_UNKNOWN;
 
     if (keycode < SDL_arraysize(Android_Keycodes)) {
         scancode = Android_Keycodes[keycode];
--- a/src/video/bwindow/SDL_BWin.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/bwindow/SDL_BWin.h	Mon Jan 24 13:47:35 2011 -0600
@@ -509,7 +509,7 @@
 
                 if (msg->FindInt32("key", &key) == B_OK
                     && msg->FindInt32("modifiers", &modifiers) == B_OK) {
-                    SDL_keysym keysym;
+                    SDL_KeySym keysym;
                     keysym.scancode = key;
                     if ((key > 0) && (key < 128)) {
                         keysym.sym = keymap[key];
@@ -543,7 +543,7 @@
                 int32 modifiers;
                 if (msg->FindInt32("key", &key) == B_OK
                     && msg->FindInt32("modifiers", &modifiers) == B_OK) {
-                    SDL_keysym keysym;
+                    SDL_KeySym keysym;
                     keysym.scancode = key;
                     if ((key > 0) && (key < 128)) {
                         keysym.sym = keymap[key];
--- a/src/video/cocoa/SDL_cocoakeyboard.m	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/cocoa/SDL_cocoakeyboard.m	Mon Jan 24 13:47:35 2011 -0600
@@ -246,7 +246,7 @@
 HandleNonDeviceModifier(unsigned int device_independent_mask,
                         unsigned int oldMods,
                         unsigned int newMods,
-                        SDL_scancode scancode)
+                        SDL_ScanCode scancode)
 {
     unsigned int oldMask, newMask;
     
@@ -268,7 +268,7 @@
  */
 static void
 HandleModifierOneSide(unsigned int oldMods, unsigned int newMods,
-                      SDL_scancode scancode, 
+                      SDL_ScanCode scancode, 
                       unsigned int sided_device_dependent_mask)
 {
     unsigned int old_dep_mask, new_dep_mask;
@@ -297,8 +297,8 @@
 static void
 HandleModifierSide(int device_independent_mask, 
                    unsigned int oldMods, unsigned int newMods, 
-                   SDL_scancode left_scancode, 
-                   SDL_scancode right_scancode,
+                   SDL_ScanCode left_scancode, 
+                   SDL_ScanCode right_scancode,
                    unsigned int left_device_dependent_mask, 
                    unsigned int right_device_dependent_mask)
 {
@@ -341,8 +341,8 @@
 static void
 ReleaseModifierSide(unsigned int device_independent_mask, 
                     unsigned int oldMods, unsigned int newMods,
-                    SDL_scancode left_scancode, 
-                    SDL_scancode right_scancode,
+                    SDL_ScanCode left_scancode, 
+                    SDL_ScanCode right_scancode,
                     unsigned int left_device_dependent_mask, 
                     unsigned int right_device_dependent_mask)
 {
@@ -409,13 +409,13 @@
                  unsigned int oldMods, unsigned int newMods)
 {
 	/* Set up arrays for the key syms for the left and right side. */
-    const SDL_scancode left_mapping[]  = {
+    const SDL_ScanCode left_mapping[]  = {
         SDL_SCANCODE_LSHIFT,
         SDL_SCANCODE_LCTRL,
         SDL_SCANCODE_LALT,
         SDL_SCANCODE_LGUI
     };
-    const SDL_scancode right_mapping[] = {
+    const SDL_ScanCode right_mapping[] = {
         SDL_SCANCODE_RSHIFT,
         SDL_SCANCODE_RCTRL,
         SDL_SCANCODE_RALT,
@@ -489,7 +489,7 @@
 #endif
     const void *chr_data;
     int i;
-    SDL_scancode scancode;
+    SDL_ScanCode scancode;
     SDLKey keymap[SDL_NUM_SCANCODES];
 
     /* See if the keymap needs to be updated */
@@ -675,7 +675,7 @@
 {
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
     unsigned short scancode = [event keyCode];
-    SDL_scancode code;
+    SDL_ScanCode code;
 #if 0
     const char *text;
 #endif
--- a/src/video/directfb/SDL_DirectFB_events.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/directfb/SDL_DirectFB_events.c	Mon Jan 24 13:47:35 2011 -0600
@@ -56,11 +56,11 @@
 static SDLKey oskeymap[256];
 
 
-static SDL_keysym *DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt,
-                                         SDL_keysym * keysym);
-static SDL_keysym *DirectFB_TranslateKeyInputEvent(_THIS, int index,
+static SDL_KeySym *DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt,
+                                         SDL_KeySym * keysym);
+static SDL_KeySym *DirectFB_TranslateKeyInputEvent(_THIS, int index,
                                                    DFBInputEvent * evt,
-                                                   SDL_keysym * keysym);
+                                                   SDL_KeySym * keysym);
 
 static void DirectFB_InitOSKeymap(_THIS, SDLKey * keypmap, int numkeys);
 static int DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button);
@@ -168,7 +168,7 @@
                    DFBWindowEvent * evt)
 {
     SDL_DFB_DEVICEDATA(_this);
-    SDL_keysym keysym;
+    SDL_KeySym keysym;
     char text[5];
 
     if (evt->clazz == DFEC_WINDOW) {
@@ -300,7 +300,7 @@
 ProcessInputEvent(_THIS, DFBInputEvent * ievt)
 {
     SDL_DFB_DEVICEDATA(_this);
-    SDL_keysym keysym;
+    SDL_KeySym keysym;
     int kbd_idx;
     char text[5];
 
@@ -549,8 +549,8 @@
 
 }
 
-static SDL_keysym *
-DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_keysym * keysym)
+static SDL_KeySym *
+DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_KeySym * keysym)
 {
     SDL_DFB_DEVICEDATA(_this);
 
@@ -577,9 +577,9 @@
     return keysym;
 }
 
-static SDL_keysym *
+static SDL_KeySym *
 DirectFB_TranslateKeyInputEvent(_THIS, int index, DFBInputEvent * evt,
-                                SDL_keysym * keysym)
+                                SDL_KeySym * keysym)
 {
     SDL_DFB_DEVICEDATA(_this);
 
@@ -719,7 +719,7 @@
 
     while (devdata->eventbuffer->GetEvent(devdata->eventbuffer,
                                           DFB_EVENT(&evt)) == DFB_OK) {
-        SDL_keysym keysym;
+        SDL_KeySym keysym;
         DFBInputDeviceModifierMask mod;
 
         if (evt.clazz = DFEC_INPUT) {
--- a/src/video/photon/SDL_photon.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/photon/SDL_photon.c	Mon Jan 24 13:47:35 2011 -0600
@@ -2488,7 +2488,7 @@
                 case Ph_EV_KEY:
                     {
                         PhKeyEvent_t *keyevent = NULL;
-                        SDL_scancode scancode = SDL_SCANCODE_UNKNOWN;
+                        SDL_ScanCode scancode = SDL_SCANCODE_UNKNOWN;
                         SDL_bool pressed = SDL_FALSE;
 
                         keyevent = PhGetData(event);
--- a/src/video/photon/SDL_photon_input.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/photon/SDL_photon_input.c	Mon Jan 24 13:47:35 2011 -0600
@@ -460,10 +460,10 @@
     return;
 }
 
-SDL_scancode
+SDL_ScanCode
 photon_to_sdl_keymap(uint32_t key)
 {
-    SDL_scancode scancode = SDL_SCANCODE_UNKNOWN;
+    SDL_ScanCode scancode = SDL_SCANCODE_UNKNOWN;
 
     switch (key & 0x0000007F) {
     case PHOTON_SCANCODE_ESCAPE:
--- a/src/video/photon/SDL_photon_input.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/photon/SDL_photon_input.h	Mon Jan 24 13:47:35 2011 -0600
@@ -45,6 +45,6 @@
 #define SDL_PHOTON_MOUSE_COLOR_WHITE 0xFFFFFFFF
 #define SDL_PHOTON_MOUSE_COLOR_TRANS 0x00000000
 
-SDL_scancode photon_to_sdl_keymap(uint32_t key);
+SDL_ScanCode photon_to_sdl_keymap(uint32_t key);
 
 #endif /* __SDL_GF_INPUT_H__ */
--- a/src/video/riscos/SDL_riscosevents.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/riscos/SDL_riscosevents.c	Mon Jan 24 13:47:35 2011 -0600
@@ -69,7 +69,7 @@
 
 static char RO_pressed[ROKEYBD_ARRAYSIZE];
 
-static SDL_keysym *TranslateKey(int intkey, SDL_keysym * keysym, int pressed);
+static SDL_KeySym *TranslateKey(int intkey, SDL_KeySym * keysym, int pressed);
 
 void RISCOS_PollMouse(_THIS);
 void RISCOS_PollKeyboard();
@@ -366,7 +366,7 @@
     int which_key = ROKEY_LEFT_SHIFT;
     int j;
     int min_key, max_key;
-    SDL_keysym key;
+    SDL_KeySym key;
 
     /* Scan the keyboard to see what is pressed */
     while (which_key <= ROKEY_LAST_KEY) {
@@ -428,8 +428,8 @@
     }
 }
 
-static SDL_keysym *
-TranslateKey(int intkey, SDL_keysym * keysym, int pressed)
+static SDL_KeySym *
+TranslateKey(int intkey, SDL_KeySym * keysym, int pressed)
 {
     /* Set the keysym information */
     keysym->scancode = (unsigned char) intkey;
--- a/src/video/uikit/SDL_uikitview.m	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/uikit/SDL_uikitview.m	Mon Jan 24 13:47:35 2011 -0600
@@ -267,10 +267,10 @@
 			unichar c = [string characterAtIndex: i];
 			
 			Uint16 mod = 0;
-			SDL_scancode code;
+			SDL_ScanCode code;
 			
 			if (c < 127) {
-				/* figure out the SDL_scancode and SDL_keymod for this unichar */
+				/* figure out the SDL_ScanCode and SDL_keymod for this unichar */
 				code = unicharToUIKeyInfoTable[c].code;
 				mod  = unicharToUIKeyInfoTable[c].mod;
 			}
--- a/src/video/uikit/keyinfotable.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/uikit/keyinfotable.h	Mon Jan 24 13:47:35 2011 -0600
@@ -27,14 +27,14 @@
 
 /*
 	This file is used by the keyboard code in SDL_uikitview.m to convert between characters
-	passed in from the iPhone's virtual keyboard, and tuples of SDL_scancodes and SDL_keymods.
+	passed in from the iPhone's virtual keyboard, and tuples of SDL_ScanCodes and SDL_keymods.
 	For example unicharToUIKeyInfoTable['a'] would give you the scan code and keymod for lower
 	case a.
 */
 
 typedef struct
 {
-    SDL_scancode code;
+    SDL_ScanCode code;
     Uint16 mod;
 } UIKitKeyInfo;
 
--- a/src/video/windows/SDL_windowskeyboard.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/windows/SDL_windowskeyboard.c	Mon Jan 24 13:47:35 2011 -0600
@@ -145,7 +145,7 @@
 WIN_UpdateKeymap()
 {
     int i;
-    SDL_scancode scancode;
+    SDL_ScanCode scancode;
     SDLKey keymap[SDL_NUM_SCANCODES];
 
     SDL_GetDefaultKeymap(keymap);
--- a/src/video/windows/SDL_windowsvideo.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/windows/SDL_windowsvideo.h	Mon Jan 24 13:47:35 2011 -0600
@@ -160,7 +160,7 @@
     PFCoordTransform CoordTransform;
 #endif
 
-    const SDL_scancode *key_layout;
+    const SDL_ScanCode *key_layout;
 	DWORD clipboard_count;
 
 	/* Touch input functions */
--- a/src/video/x11/SDL_x11events.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/x11/SDL_x11events.c	Mon Jan 24 13:47:35 2011 -0600
@@ -202,7 +202,7 @@
     case KeyPress:{
             KeyCode keycode = xevent.xkey.keycode;
             KeySym keysym = NoSymbol;
-            SDL_scancode scancode;
+            SDL_ScanCode scancode;
             char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
             Status status = 0;
 
--- a/src/video/x11/SDL_x11keyboard.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/x11/SDL_x11keyboard.c	Mon Jan 24 13:47:35 2011 -0600
@@ -134,7 +134,7 @@
 
 static const struct
 {
-    const SDL_scancode const *table;
+    const SDL_ScanCode const *table;
     int table_size;
 } scancode_set[] = {
     { darwin_scancode_table, SDL_arraysize(darwin_scancode_table) },
@@ -175,7 +175,7 @@
     int i, j;
     int min_keycode, max_keycode;
     struct {
-        SDL_scancode scancode;
+        SDL_ScanCode scancode;
         KeySym keysym;
         int value;
     } fingerprint[] = {
@@ -215,7 +215,7 @@
             printf("Using scancode set %d, min_keycode = %d, max_keycode = %d, table_size = %d\n", i, min_keycode, max_keycode, scancode_set[i].table_size);
 #endif
             SDL_memcpy(&data->key_layout[min_keycode], scancode_set[i].table,
-                       sizeof(SDL_scancode) * scancode_set[i].table_size);
+                       sizeof(SDL_ScanCode) * scancode_set[i].table_size);
             fingerprint_detected = SDL_TRUE;
             break;
         }
@@ -239,7 +239,7 @@
                 key = X11_KeyCodeToSDLKey(data->display, i);
                 for (j = 0; j < SDL_arraysize(keymap); ++j) {
                     if (keymap[j] == key) {
-                        data->key_layout[i] = (SDL_scancode) j;
+                        data->key_layout[i] = (SDL_ScanCode) j;
                         break;
                     }
                 }
@@ -264,7 +264,7 @@
 {
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
     int i;
-    SDL_scancode scancode;
+    SDL_ScanCode scancode;
     SDLKey keymap[SDL_NUM_SCANCODES];
 
     SDL_zero(keymap);
--- a/src/video/x11/SDL_x11video.h	Sun Jan 23 21:55:04 2011 -0800
+++ b/src/video/x11/SDL_x11video.h	Mon Jan 24 13:47:35 2011 -0600
@@ -96,7 +96,7 @@
     Atom _NET_WM_ICON;
     Atom UTF8_STRING;
 
-    SDL_scancode key_layout[256];
+    SDL_ScanCode key_layout[256];
     SDL_bool selection_waiting;
 } SDL_VideoData;
 
--- a/test/checkkeys.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/test/checkkeys.c	Mon Jan 24 13:47:35 2011 -0600
@@ -53,7 +53,7 @@
 }
 
 static void
-PrintKey(SDL_keysym * sym, SDL_bool pressed, SDL_bool repeat)
+PrintKey(SDL_KeySym * sym, SDL_bool pressed, SDL_bool repeat)
 {
     /* Print the keycode, name and state */
     if (sym->sym) {
--- a/test/testkeys.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/test/testkeys.c	Mon Jan 24 13:47:35 2011 -0600
@@ -11,7 +11,7 @@
 int
 main(int argc, char *argv[])
 {
-    SDL_scancode scancode;
+    SDL_ScanCode scancode;
 
     if (SDL_Init(SDL_INIT_VIDEO) < 0) {
         fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
--- a/test/testwm.c	Sun Jan 23 21:55:04 2011 -0800
+++ b/test/testwm.c	Mon Jan 24 13:47:35 2011 -0600
@@ -210,7 +210,7 @@
         printf(" MODE");
 }
 
-static void PrintKey(const SDL_keysym *sym, int pressed)
+static void PrintKey(const SDL_KeySym *sym, int pressed)
 {
     /* Print the keycode, name and state */
     if ( sym->sym ) {