Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased.
authorSam Lantinga <slouken@libsdl.org>
Mon, 07 Feb 2011 09:37:11 -0800
changeset 5218572a73d71b5f
parent 5217 9c0593fa27d6
child 5219 c1a92e61907d
Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased.
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/directfb/SDL_DirectFB_video.h
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
     1.1 --- a/include/SDL_compat.h	Mon Feb 07 09:23:01 2011 -0800
     1.2 +++ b/include/SDL_compat.h	Mon Feb 07 09:37:11 2011 -0800
     1.3 @@ -215,8 +215,10 @@
     1.4   */
     1.5  /*@{*/
     1.6  
     1.7 -#define SDL_keysym		SDL_KeySym
     1.8 -#define SDL_scancode	SDL_ScanCode
     1.9 +#define SDL_keysym		SDL_Keysym
    1.10 +#define SDL_KeySym		SDL_Keysym
    1.11 +#define SDL_scancode	SDL_Scancode
    1.12 +#define SDL_ScanCode	SDL_Scancode
    1.13  
    1.14  /** 
    1.15   *  \name Renamed keys
     2.1 --- a/include/SDL_events.h	Mon Feb 07 09:23:01 2011 -0800
     2.2 +++ b/include/SDL_events.h	Mon Feb 07 09:37:11 2011 -0800
     2.3 @@ -151,7 +151,7 @@
     2.4      Uint8 repeat;       /**< Non-zero if this is a key repeat */
     2.5      Uint8 padding2;
     2.6      Uint8 padding3;
     2.7 -    SDL_KeySym keysym;  /**< The key that was pressed or released */
     2.8 +    SDL_Keysym keysym;  /**< The key that was pressed or released */
     2.9  } SDL_KeyboardEvent;
    2.10  
    2.11  #define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)
     3.1 --- a/include/SDL_keyboard.h	Mon Feb 07 09:23:01 2011 -0800
     3.2 +++ b/include/SDL_keyboard.h	Mon Feb 07 09:37:11 2011 -0800
     3.3 @@ -45,13 +45,13 @@
     3.4  /**
     3.5   *  \brief The SDL keysym structure, used in key events.
     3.6   */
     3.7 -typedef struct SDL_KeySym
     3.8 +typedef struct SDL_Keysym
     3.9  {
    3.10 -    SDL_ScanCode scancode;      /**< SDL physical key code - see ::SDL_ScanCode for details */
    3.11 +    SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */
    3.12      SDLKey sym;                 /**< SDL virtual key code - see ::SDLKey for details */
    3.13      Uint16 mod;                 /**< current key modifiers */
    3.14      Uint32 unicode;             /**< \deprecated use SDL_TextInputEvent instead */
    3.15 -} SDL_KeySym;
    3.16 +} SDL_Keysym;
    3.17  
    3.18  /* Function prototypes */
    3.19  
    3.20 @@ -65,7 +65,7 @@
    3.21   *  
    3.22   *  \param numkeys if non-NULL, receives the length of the returned array.
    3.23   *  
    3.24 - *  \return An array of key states. Indexes into this array are obtained by using ::SDL_ScanCode values.
    3.25 + *  \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.
    3.26   *  
    3.27   *  \b Example:
    3.28   *  \code
    3.29 @@ -97,17 +97,17 @@
    3.30   *  
    3.31   *  \sa SDL_GetKeyName()
    3.32   */
    3.33 -extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_ScanCode scancode);
    3.34 +extern DECLSPEC SDLKey SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);
    3.35  
    3.36  /**
    3.37   *  \brief Get the scancode corresponding to the given key code according to the
    3.38   *         current keyboard layout.
    3.39   *  
    3.40 - *  See ::SDL_ScanCode for details.
    3.41 + *  See ::SDL_Scancode for details.
    3.42   *  
    3.43   *  \sa SDL_GetScancodeName()
    3.44   */
    3.45 -extern DECLSPEC SDL_ScanCode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
    3.46 +extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDLKey key);
    3.47  
    3.48  /**
    3.49   *  \brief Get a human-readable name for a scancode.
    3.50 @@ -117,9 +117,9 @@
    3.51   *          copy it.  If the scancode doesn't have a name, this function returns
    3.52   *          an empty string ("").
    3.53   *
    3.54 - *  \sa SDL_ScanCode
    3.55 + *  \sa SDL_Scancode
    3.56   */
    3.57 -extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_ScanCode
    3.58 +extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode
    3.59                                                          scancode);
    3.60  
    3.61  /**
     4.1 --- a/include/SDL_scancode.h	Mon Feb 07 09:23:01 2011 -0800
     4.2 +++ b/include/SDL_scancode.h	Mon Feb 07 09:37:11 2011 -0800
     4.3 @@ -35,7 +35,7 @@
     4.4   *  \brief The SDL keyboard scancode representation.
     4.5   *  
     4.6   *  Values of this type are used to represent keyboard keys, among other places
     4.7 - *  in the \link SDL_KeySym::scancode key.keysym.scancode \endlink field of the
     4.8 + *  in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the
     4.9   *  SDL_Event structure.
    4.10   *  
    4.11   *  The values in this enumeration are based on the USB usage page standard:
    4.12 @@ -392,7 +392,7 @@
    4.13  
    4.14      SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes 
    4.15                                   for array bounds */
    4.16 -} SDL_ScanCode;
    4.17 +} SDL_Scancode;
    4.18  
    4.19  #endif /* _SDL_scancode_h */
    4.20  
     5.1 --- a/src/events/SDL_keyboard.c	Mon Feb 07 09:23:01 2011 -0800
     5.2 +++ b/src/events/SDL_keyboard.c	Mon Feb 07 09:37:11 2011 -0800
     5.3 @@ -562,7 +562,7 @@
     5.4  SDL_ResetKeyboard(void)
     5.5  {
     5.6      SDL_Keyboard *keyboard = &SDL_keyboard;
     5.7 -    SDL_ScanCode scancode;
     5.8 +    SDL_Scancode scancode;
     5.9  
    5.10      for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) {
    5.11          if (keyboard->keystate[scancode] == SDL_PRESSED) {
    5.12 @@ -590,7 +590,7 @@
    5.13  }
    5.14  
    5.15  void
    5.16 -SDL_SetScancodeName(SDL_ScanCode scancode, const char *name)
    5.17 +SDL_SetScancodeName(SDL_Scancode scancode, const char *name)
    5.18  {
    5.19      SDL_scancode_names[scancode] = name;
    5.20  }
    5.21 @@ -638,7 +638,7 @@
    5.22  }
    5.23  
    5.24  int
    5.25 -SDL_SendKeyboardKey(Uint8 state, SDL_ScanCode scancode)
    5.26 +SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode)
    5.27  {
    5.28      SDL_Keyboard *keyboard = &SDL_keyboard;
    5.29      int posted;
    5.30 @@ -849,18 +849,18 @@
    5.31  }
    5.32  
    5.33  SDLKey
    5.34 -SDL_GetKeyFromScancode(SDL_ScanCode scancode)
    5.35 +SDL_GetKeyFromScancode(SDL_Scancode scancode)
    5.36  {
    5.37      SDL_Keyboard *keyboard = &SDL_keyboard;
    5.38  
    5.39      return keyboard->keymap[scancode];
    5.40  }
    5.41  
    5.42 -SDL_ScanCode
    5.43 +SDL_Scancode
    5.44  SDL_GetScancodeFromKey(SDLKey key)
    5.45  {
    5.46      SDL_Keyboard *keyboard = &SDL_keyboard;
    5.47 -    SDL_ScanCode scancode;
    5.48 +    SDL_Scancode scancode;
    5.49  
    5.50      for (scancode = SDL_SCANCODE_UNKNOWN; scancode < SDL_NUM_SCANCODES;
    5.51           ++scancode) {
    5.52 @@ -872,7 +872,7 @@
    5.53  }
    5.54  
    5.55  const char *
    5.56 -SDL_GetScancodeName(SDL_ScanCode scancode)
    5.57 +SDL_GetScancodeName(SDL_Scancode scancode)
    5.58  {
    5.59      const char *name = SDL_scancode_names[scancode];
    5.60  
    5.61 @@ -890,7 +890,7 @@
    5.62  
    5.63      if (key & SDLK_SCANCODE_MASK) {
    5.64          return
    5.65 -            SDL_GetScancodeName((SDL_ScanCode) (key & ~SDLK_SCANCODE_MASK));
    5.66 +            SDL_GetScancodeName((SDL_Scancode) (key & ~SDLK_SCANCODE_MASK));
    5.67      }
    5.68  
    5.69      switch (key) {
     6.1 --- a/src/events/SDL_keyboard_c.h	Mon Feb 07 09:23:01 2011 -0800
     6.2 +++ b/src/events/SDL_keyboard_c.h	Mon Feb 07 09:37:11 2011 -0800
     6.3 @@ -43,13 +43,13 @@
     6.4     name. Encoded as UTF-8. The string is not copied, thus the pointer given to
     6.5     this function must stay valid forever (or at least until the call to
     6.6     VideoQuit()). */
     6.7 -extern void SDL_SetScancodeName(SDL_ScanCode scancode, const char *name);
     6.8 +extern void SDL_SetScancodeName(SDL_Scancode scancode, const char *name);
     6.9  
    6.10  /* Set the keyboard focus window */
    6.11  extern void SDL_SetKeyboardFocus(SDL_Window * window);
    6.12  
    6.13  /* Send a keyboard key event */
    6.14 -extern int SDL_SendKeyboardKey(Uint8 state, SDL_ScanCode scancode);
    6.15 +extern int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode);
    6.16  
    6.17  /* Send keyboard text input */
    6.18  extern int SDL_SendKeyboardText(const char *text);
     7.1 --- a/src/events/scancodes_darwin.h	Mon Feb 07 09:23:01 2011 -0800
     7.2 +++ b/src/events/scancodes_darwin.h	Mon Feb 07 09:37:11 2011 -0800
     7.3 @@ -27,7 +27,7 @@
     7.4     - experimentation on various ADB and USB ISO keyboards and one ADB ANSI keyboard
     7.5  */
     7.6  /* *INDENT-OFF* */
     7.7 -static const SDL_ScanCode darwin_scancode_table[] = {
     7.8 +static const SDL_Scancode darwin_scancode_table[] = {
     7.9      /*   0 */   SDL_SCANCODE_A,
    7.10      /*   1 */   SDL_SCANCODE_S,
    7.11      /*   2 */   SDL_SCANCODE_D,
     8.1 --- a/src/events/scancodes_linux.h	Mon Feb 07 09:23:01 2011 -0800
     8.2 +++ b/src/events/scancodes_linux.h	Mon Feb 07 09:37:11 2011 -0800
     8.3 @@ -26,7 +26,7 @@
     8.4     - Linux kernel source input.h
     8.5  */
     8.6  /* *INDENT-OFF* */
     8.7 -static SDL_ScanCode const linux_scancode_table[] = {
     8.8 +static SDL_Scancode const linux_scancode_table[] = {
     8.9      /*  0 */    SDL_SCANCODE_UNKNOWN,
    8.10      /*  1 */    SDL_SCANCODE_ESCAPE,
    8.11      /*  2 */    SDL_SCANCODE_1,
     9.1 --- a/src/events/scancodes_windows.h	Mon Feb 07 09:23:01 2011 -0800
     9.2 +++ b/src/events/scancodes_windows.h	Mon Feb 07 09:37:11 2011 -0800
     9.3 @@ -26,7 +26,7 @@
     9.4     - msdn.microsoft.com
     9.5  */
     9.6  /* *INDENT-OFF* */
     9.7 -static const SDL_ScanCode windows_scancode_table[] = {
     9.8 +static const SDL_Scancode windows_scancode_table[] = {
     9.9      /*  0, 0x00 */      SDL_SCANCODE_UNKNOWN,
    9.10      /*  1, 0x01 */      SDL_SCANCODE_UNKNOWN,
    9.11      /*  2, 0x02 */      SDL_SCANCODE_UNKNOWN,
    10.1 --- a/src/events/scancodes_xfree86.h	Mon Feb 07 09:23:01 2011 -0800
    10.2 +++ b/src/events/scancodes_xfree86.h	Mon Feb 07 09:37:11 2011 -0800
    10.3 @@ -26,7 +26,7 @@
    10.4     - atKeyNames.h from XFree86 source code
    10.5  */
    10.6  /* *INDENT-OFF* */
    10.7 -static const SDL_ScanCode xfree86_scancode_table[] = {
    10.8 +static const SDL_Scancode xfree86_scancode_table[] = {
    10.9      /*  0 */    SDL_SCANCODE_UNKNOWN,
   10.10      /*  1 */    SDL_SCANCODE_ESCAPE,
   10.11      /*  2 */    SDL_SCANCODE_1,
   10.12 @@ -177,7 +177,7 @@
   10.13  };
   10.14  
   10.15  /* for wireless usb keyboard (manufacturer TRUST) without numpad. */
   10.16 -static const SDL_ScanCode xfree86_scancode_table2[] = {
   10.17 +static const SDL_Scancode xfree86_scancode_table2[] = {
   10.18      /*  0 */    SDL_SCANCODE_UNKNOWN,
   10.19      /*  1 */    SDL_SCANCODE_ESCAPE,
   10.20      /*  2 */    SDL_SCANCODE_1,
    11.1 --- a/src/video/android/SDL_androidkeyboard.c	Mon Feb 07 09:23:01 2011 -0800
    11.2 +++ b/src/video/android/SDL_androidkeyboard.c	Mon Feb 07 09:37:11 2011 -0800
    11.3 @@ -37,7 +37,7 @@
    11.4      SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES);
    11.5  }
    11.6  
    11.7 -static SDL_ScanCode Android_Keycodes[] = {
    11.8 +static SDL_Scancode Android_Keycodes[] = {
    11.9      SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */
   11.10      SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_LEFT */
   11.11      SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_RIGHT */
   11.12 @@ -151,10 +151,10 @@
   11.13      SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_MODE */
   11.14  };
   11.15  
   11.16 -static SDL_ScanCode
   11.17 +static SDL_Scancode
   11.18  TranslateKeycode(int keycode)
   11.19  {
   11.20 -    SDL_ScanCode scancode = SDL_SCANCODE_UNKNOWN;
   11.21 +    SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN;
   11.22  
   11.23      if (keycode < SDL_arraysize(Android_Keycodes)) {
   11.24          scancode = Android_Keycodes[keycode];
    12.1 --- a/src/video/bwindow/SDL_BWin.h	Mon Feb 07 09:23:01 2011 -0800
    12.2 +++ b/src/video/bwindow/SDL_BWin.h	Mon Feb 07 09:37:11 2011 -0800
    12.3 @@ -509,7 +509,7 @@
    12.4  
    12.5                  if (msg->FindInt32("key", &key) == B_OK
    12.6                      && msg->FindInt32("modifiers", &modifiers) == B_OK) {
    12.7 -                    SDL_KeySym keysym;
    12.8 +                    SDL_Keysym keysym;
    12.9                      keysym.scancode = key;
   12.10                      if ((key > 0) && (key < 128)) {
   12.11                          keysym.sym = keymap[key];
   12.12 @@ -543,7 +543,7 @@
   12.13                  int32 modifiers;
   12.14                  if (msg->FindInt32("key", &key) == B_OK
   12.15                      && msg->FindInt32("modifiers", &modifiers) == B_OK) {
   12.16 -                    SDL_KeySym keysym;
   12.17 +                    SDL_Keysym keysym;
   12.18                      keysym.scancode = key;
   12.19                      if ((key > 0) && (key < 128)) {
   12.20                          keysym.sym = keymap[key];
    13.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m	Mon Feb 07 09:23:01 2011 -0800
    13.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m	Mon Feb 07 09:37:11 2011 -0800
    13.3 @@ -246,7 +246,7 @@
    13.4  HandleNonDeviceModifier(unsigned int device_independent_mask,
    13.5                          unsigned int oldMods,
    13.6                          unsigned int newMods,
    13.7 -                        SDL_ScanCode scancode)
    13.8 +                        SDL_Scancode scancode)
    13.9  {
   13.10      unsigned int oldMask, newMask;
   13.11      
   13.12 @@ -268,7 +268,7 @@
   13.13   */
   13.14  static void
   13.15  HandleModifierOneSide(unsigned int oldMods, unsigned int newMods,
   13.16 -                      SDL_ScanCode scancode, 
   13.17 +                      SDL_Scancode scancode, 
   13.18                        unsigned int sided_device_dependent_mask)
   13.19  {
   13.20      unsigned int old_dep_mask, new_dep_mask;
   13.21 @@ -297,8 +297,8 @@
   13.22  static void
   13.23  HandleModifierSide(int device_independent_mask, 
   13.24                     unsigned int oldMods, unsigned int newMods, 
   13.25 -                   SDL_ScanCode left_scancode, 
   13.26 -                   SDL_ScanCode right_scancode,
   13.27 +                   SDL_Scancode left_scancode, 
   13.28 +                   SDL_Scancode right_scancode,
   13.29                     unsigned int left_device_dependent_mask, 
   13.30                     unsigned int right_device_dependent_mask)
   13.31  {
   13.32 @@ -341,8 +341,8 @@
   13.33  static void
   13.34  ReleaseModifierSide(unsigned int device_independent_mask, 
   13.35                      unsigned int oldMods, unsigned int newMods,
   13.36 -                    SDL_ScanCode left_scancode, 
   13.37 -                    SDL_ScanCode right_scancode,
   13.38 +                    SDL_Scancode left_scancode, 
   13.39 +                    SDL_Scancode right_scancode,
   13.40                      unsigned int left_device_dependent_mask, 
   13.41                      unsigned int right_device_dependent_mask)
   13.42  {
   13.43 @@ -409,13 +409,13 @@
   13.44                   unsigned int oldMods, unsigned int newMods)
   13.45  {
   13.46  	/* Set up arrays for the key syms for the left and right side. */
   13.47 -    const SDL_ScanCode left_mapping[]  = {
   13.48 +    const SDL_Scancode left_mapping[]  = {
   13.49          SDL_SCANCODE_LSHIFT,
   13.50          SDL_SCANCODE_LCTRL,
   13.51          SDL_SCANCODE_LALT,
   13.52          SDL_SCANCODE_LGUI
   13.53      };
   13.54 -    const SDL_ScanCode right_mapping[] = {
   13.55 +    const SDL_Scancode right_mapping[] = {
   13.56          SDL_SCANCODE_RSHIFT,
   13.57          SDL_SCANCODE_RCTRL,
   13.58          SDL_SCANCODE_RALT,
   13.59 @@ -489,7 +489,7 @@
   13.60  #endif
   13.61      const void *chr_data;
   13.62      int i;
   13.63 -    SDL_ScanCode scancode;
   13.64 +    SDL_Scancode scancode;
   13.65      SDLKey keymap[SDL_NUM_SCANCODES];
   13.66  
   13.67      /* See if the keymap needs to be updated */
   13.68 @@ -675,7 +675,7 @@
   13.69  {
   13.70      SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
   13.71      unsigned short scancode = [event keyCode];
   13.72 -    SDL_ScanCode code;
   13.73 +    SDL_Scancode code;
   13.74  #if 0
   13.75      const char *text;
   13.76  #endif
    14.1 --- a/src/video/directfb/SDL_DirectFB_events.c	Mon Feb 07 09:23:01 2011 -0800
    14.2 +++ b/src/video/directfb/SDL_DirectFB_events.c	Mon Feb 07 09:37:11 2011 -0800
    14.3 @@ -61,15 +61,15 @@
    14.4  };
    14.5  
    14.6  /* The translation tables from a DirectFB keycode to a SDL keysym */
    14.7 -static SDL_ScanCode oskeymap[256];
    14.8 +static SDL_Scancode oskeymap[256];
    14.9  
   14.10  
   14.11 -static SDL_KeySym *DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt,
   14.12 -                                         SDL_KeySym * keysym);
   14.13 -static SDL_KeySym *DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
   14.14 -                                                   SDL_KeySym * keysym);
   14.15 +static SDL_Keysym *DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt,
   14.16 +                                         SDL_Keysym * keysym);
   14.17 +static SDL_Keysym *DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
   14.18 +                                                   SDL_Keysym * keysym);
   14.19  
   14.20 -static void DirectFB_InitOSKeymap(_THIS, SDL_ScanCode * keypmap, int numkeys);
   14.21 +static void DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keypmap, int numkeys);
   14.22  static int DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button);
   14.23  
   14.24  static void UnicodeToUtf8( Uint16 w , char *utf8buf)
   14.25 @@ -176,7 +176,7 @@
   14.26  {
   14.27      SDL_DFB_DEVICEDATA(_this);
   14.28      SDL_DFB_WINDOWDATA(sdlwin);
   14.29 -    SDL_KeySym keysym;
   14.30 +    SDL_Keysym keysym;
   14.31      char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
   14.32  
   14.33      if (evt->clazz == DFEC_WINDOW) {
   14.34 @@ -308,7 +308,7 @@
   14.35  ProcessInputEvent(_THIS, DFBInputEvent * ievt)
   14.36  {
   14.37      SDL_DFB_DEVICEDATA(_this);
   14.38 -    SDL_KeySym keysym;
   14.39 +    SDL_Keysym keysym;
   14.40      int kbd_idx;
   14.41      char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
   14.42  
   14.43 @@ -448,7 +448,7 @@
   14.44  }
   14.45  
   14.46  void
   14.47 -DirectFB_InitOSKeymap(_THIS, SDL_ScanCode * keymap, int numkeys)
   14.48 +DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys)
   14.49  {
   14.50      int i;
   14.51  
   14.52 @@ -575,8 +575,8 @@
   14.53  
   14.54  }
   14.55  
   14.56 -static SDL_KeySym *
   14.57 -DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_KeySym * keysym)
   14.58 +static SDL_Keysym *
   14.59 +DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym)
   14.60  {
   14.61      SDL_DFB_DEVICEDATA(_this);
   14.62      int kbd_idx = 0; /* Window events lag the device source KbdIndex(_this, evt->device_id); */
   14.63 @@ -605,9 +605,9 @@
   14.64      return keysym;
   14.65  }
   14.66  
   14.67 -static SDL_KeySym *
   14.68 +static SDL_Keysym *
   14.69  DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
   14.70 -                                SDL_KeySym * keysym)
   14.71 +                                SDL_Keysym * keysym)
   14.72  {
   14.73      SDL_DFB_DEVICEDATA(_this);
   14.74      int kbd_idx = KbdIndex(_this, evt->device_id);
    15.1 --- a/src/video/directfb/SDL_DirectFB_video.h	Mon Feb 07 09:23:01 2011 -0800
    15.2 +++ b/src/video/directfb/SDL_DirectFB_video.h	Mon Feb 07 09:37:11 2011 -0800
    15.3 @@ -142,7 +142,7 @@
    15.4  typedef struct _DFB_KeyboardData DFB_KeyboardData;
    15.5  struct _DFB_KeyboardData
    15.6  {
    15.7 -	const SDL_ScanCode	*map;		/* keyboard scancode map */
    15.8 +	const SDL_Scancode	*map;		/* keyboard scancode map */
    15.9  	int				map_size;	/* size of map */
   15.10  	int				map_adjust; /* index adjust */
   15.11      int 			is_generic; /* generic keyboard */
    16.1 --- a/src/video/uikit/SDL_uikitview.m	Mon Feb 07 09:23:01 2011 -0800
    16.2 +++ b/src/video/uikit/SDL_uikitview.m	Mon Feb 07 09:37:11 2011 -0800
    16.3 @@ -267,10 +267,10 @@
    16.4              unichar c = [string characterAtIndex: i];
    16.5              
    16.6              Uint16 mod = 0;
    16.7 -            SDL_ScanCode code;
    16.8 +            SDL_Scancode code;
    16.9              
   16.10              if (c < 127) {
   16.11 -                /* figure out the SDL_ScanCode and SDL_keymod for this unichar */
   16.12 +                /* figure out the SDL_Scancode and SDL_keymod for this unichar */
   16.13                  code = unicharToUIKeyInfoTable[c].code;
   16.14                  mod  = unicharToUIKeyInfoTable[c].mod;
   16.15              }
    17.1 --- a/src/video/uikit/keyinfotable.h	Mon Feb 07 09:23:01 2011 -0800
    17.2 +++ b/src/video/uikit/keyinfotable.h	Mon Feb 07 09:37:11 2011 -0800
    17.3 @@ -27,14 +27,14 @@
    17.4  
    17.5  /*
    17.6      This file is used by the keyboard code in SDL_uikitview.m to convert between characters
    17.7 -    passed in from the iPhone's virtual keyboard, and tuples of SDL_ScanCodes and SDL_keymods.
    17.8 +    passed in from the iPhone's virtual keyboard, and tuples of SDL_Scancode and SDL_keymods.
    17.9      For example unicharToUIKeyInfoTable['a'] would give you the scan code and keymod for lower
   17.10      case a.
   17.11  */
   17.12  
   17.13  typedef struct
   17.14  {
   17.15 -    SDL_ScanCode code;
   17.16 +    SDL_Scancode code;
   17.17      Uint16 mod;
   17.18  } UIKitKeyInfo;
   17.19  
    18.1 --- a/src/video/windows/SDL_windowskeyboard.c	Mon Feb 07 09:23:01 2011 -0800
    18.2 +++ b/src/video/windows/SDL_windowskeyboard.c	Mon Feb 07 09:37:11 2011 -0800
    18.3 @@ -150,7 +150,7 @@
    18.4  WIN_UpdateKeymap()
    18.5  {
    18.6      int i;
    18.7 -    SDL_ScanCode scancode;
    18.8 +    SDL_Scancode scancode;
    18.9      SDLKey keymap[SDL_NUM_SCANCODES];
   18.10  
   18.11      SDL_GetDefaultKeymap(keymap);
    19.1 --- a/src/video/windows/SDL_windowsvideo.h	Mon Feb 07 09:23:01 2011 -0800
    19.2 +++ b/src/video/windows/SDL_windowsvideo.h	Mon Feb 07 09:37:11 2011 -0800
    19.3 @@ -123,7 +123,7 @@
    19.4      PFCoordTransform CoordTransform;
    19.5  #endif
    19.6  
    19.7 -    const SDL_ScanCode *key_layout;
    19.8 +    const SDL_Scancode *key_layout;
    19.9  	DWORD clipboard_count;
   19.10  
   19.11  	/* Touch input functions */
    20.1 --- a/src/video/x11/SDL_x11events.c	Mon Feb 07 09:23:01 2011 -0800
    20.2 +++ b/src/video/x11/SDL_x11events.c	Mon Feb 07 09:37:11 2011 -0800
    20.3 @@ -202,7 +202,7 @@
    20.4      case KeyPress:{
    20.5              KeyCode keycode = xevent.xkey.keycode;
    20.6              KeySym keysym = NoSymbol;
    20.7 -            SDL_ScanCode scancode;
    20.8 +            SDL_Scancode scancode;
    20.9              char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
   20.10              Status status = 0;
   20.11  
    21.1 --- a/src/video/x11/SDL_x11keyboard.c	Mon Feb 07 09:23:01 2011 -0800
    21.2 +++ b/src/video/x11/SDL_x11keyboard.c	Mon Feb 07 09:37:11 2011 -0800
    21.3 @@ -134,7 +134,7 @@
    21.4  
    21.5  static const struct
    21.6  {
    21.7 -    const SDL_ScanCode const *table;
    21.8 +    const SDL_Scancode const *table;
    21.9      int table_size;
   21.10  } scancode_set[] = {
   21.11      { darwin_scancode_table, SDL_arraysize(darwin_scancode_table) },
   21.12 @@ -175,7 +175,7 @@
   21.13      int i, j;
   21.14      int min_keycode, max_keycode;
   21.15      struct {
   21.16 -        SDL_ScanCode scancode;
   21.17 +        SDL_Scancode scancode;
   21.18          KeySym keysym;
   21.19          int value;
   21.20      } fingerprint[] = {
   21.21 @@ -215,7 +215,7 @@
   21.22              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);
   21.23  #endif
   21.24              SDL_memcpy(&data->key_layout[min_keycode], scancode_set[i].table,
   21.25 -                       sizeof(SDL_ScanCode) * scancode_set[i].table_size);
   21.26 +                       sizeof(SDL_Scancode) * scancode_set[i].table_size);
   21.27              fingerprint_detected = SDL_TRUE;
   21.28              break;
   21.29          }
   21.30 @@ -239,7 +239,7 @@
   21.31                  key = X11_KeyCodeToSDLKey(data->display, i);
   21.32                  for (j = 0; j < SDL_arraysize(keymap); ++j) {
   21.33                      if (keymap[j] == key) {
   21.34 -                        data->key_layout[i] = (SDL_ScanCode) j;
   21.35 +                        data->key_layout[i] = (SDL_Scancode) j;
   21.36                          break;
   21.37                      }
   21.38                  }
   21.39 @@ -264,7 +264,7 @@
   21.40  {
   21.41      SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
   21.42      int i;
   21.43 -    SDL_ScanCode scancode;
   21.44 +    SDL_Scancode scancode;
   21.45      SDLKey keymap[SDL_NUM_SCANCODES];
   21.46  
   21.47      SDL_zero(keymap);
    22.1 --- a/src/video/x11/SDL_x11video.h	Mon Feb 07 09:23:01 2011 -0800
    22.2 +++ b/src/video/x11/SDL_x11video.h	Mon Feb 07 09:37:11 2011 -0800
    22.3 @@ -89,7 +89,7 @@
    22.4      Atom _NET_WM_ICON;
    22.5      Atom UTF8_STRING;
    22.6  
    22.7 -    SDL_ScanCode key_layout[256];
    22.8 +    SDL_Scancode key_layout[256];
    22.9      SDL_bool selection_waiting;
   22.10  } SDL_VideoData;
   22.11  
    23.1 --- a/test/checkkeys.c	Mon Feb 07 09:23:01 2011 -0800
    23.2 +++ b/test/checkkeys.c	Mon Feb 07 09:37:11 2011 -0800
    23.3 @@ -53,7 +53,7 @@
    23.4  }
    23.5  
    23.6  static void
    23.7 -PrintKey(SDL_KeySym * sym, SDL_bool pressed, SDL_bool repeat)
    23.8 +PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat)
    23.9  {
   23.10      /* Print the keycode, name and state */
   23.11      if (sym->sym) {
    24.1 --- a/test/testkeys.c	Mon Feb 07 09:23:01 2011 -0800
    24.2 +++ b/test/testkeys.c	Mon Feb 07 09:37:11 2011 -0800
    24.3 @@ -11,7 +11,7 @@
    24.4  int
    24.5  main(int argc, char *argv[])
    24.6  {
    24.7 -    SDL_ScanCode scancode;
    24.8 +    SDL_Scancode scancode;
    24.9  
   24.10      if (SDL_Init(SDL_INIT_VIDEO) < 0) {
   24.11          fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    25.1 --- a/test/testwm.c	Mon Feb 07 09:23:01 2011 -0800
    25.2 +++ b/test/testwm.c	Mon Feb 07 09:37:11 2011 -0800
    25.3 @@ -210,7 +210,7 @@
    25.4          printf(" MODE");
    25.5  }
    25.6  
    25.7 -static void PrintKey(const SDL_KeySym *sym, int pressed)
    25.8 +static void PrintKey(const SDL_Keysym *sym, int pressed)
    25.9  {
   25.10      /* Print the keycode, name and state */
   25.11      if ( sym->sym ) {