diff src/video/x11/SDL_x11keyboard.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/video/x11/SDL_x11keyboard.c	Mon Feb 07 09:42:08 2011 -0800
+++ b/src/video/x11/SDL_x11keyboard.c	Mon Feb 07 10:40:21 2011 -0800
@@ -34,7 +34,7 @@
 /* *INDENT-OFF* */
 static const struct {
     KeySym keysym;
-    SDL_Key sdlkey;
+    SDL_Keycode sdlkey;
 } KeySymToSDLKey[] = {
     { XK_Return, SDLK_RETURN },
     { XK_Escape, SDLK_ESCAPE },
@@ -143,7 +143,7 @@
 };
 /* *INDENT-OFF* */
 
-static SDL_Key
+static SDL_Keycode
 X11_KeyCodeToSDLKey(Display *display, KeyCode keycode)
 {
     KeySym keysym;
@@ -157,7 +157,7 @@
 
     ucs4 = X11_KeySymToUcs4(keysym);
     if (ucs4) {
-        return (SDL_Key) ucs4;
+        return (SDL_Keycode) ucs4;
     }
 
     for (i = 0; i < SDL_arraysize(KeySymToSDLKey); ++i) {
@@ -222,7 +222,7 @@
     }
 
     if (!fingerprint_detected) {
-        SDL_Key keymap[SDL_NUM_SCANCODES];
+        SDL_Keycode keymap[SDL_NUM_SCANCODES];
 
         printf
             ("Keyboard layout unknown, please send the following to the SDL mailing list (sdl@libsdl.org):\n");
@@ -233,7 +233,7 @@
             KeySym sym;
             sym = XKeycodeToKeysym(data->display, i, 0);
             if (sym != NoSymbol) {
-                SDL_Key key;
+                SDL_Keycode key;
                 printf("code = %d, sym = 0x%X (%s) ", i - min_keycode,
                        (unsigned int) sym, XKeysymToString(sym));
                 key = X11_KeyCodeToSDLKey(data->display, i);
@@ -265,7 +265,7 @@
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
     int i;
     SDL_Scancode scancode;
-    SDL_Key keymap[SDL_NUM_SCANCODES];
+    SDL_Keycode keymap[SDL_NUM_SCANCODES];
 
     SDL_zero(keymap);