comparison src/video/android/SDL_androidkeyboard.c @ 5223:572a73d71b5f

Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 07 Feb 2011 09:37:11 -0800
parents 25d4feb7c127
children c1a92e61907d
comparison
equal deleted inserted replaced
5222:9c0593fa27d6 5223:572a73d71b5f
35 /* Add default scancode to key mapping */ 35 /* Add default scancode to key mapping */
36 SDL_GetDefaultKeymap(keymap); 36 SDL_GetDefaultKeymap(keymap);
37 SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES); 37 SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES);
38 } 38 }
39 39
40 static SDL_ScanCode Android_Keycodes[] = { 40 static SDL_Scancode Android_Keycodes[] = {
41 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */ 41 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */
42 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_LEFT */ 42 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_LEFT */
43 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_RIGHT */ 43 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SOFT_RIGHT */
44 SDL_SCANCODE_AC_HOME, /* AKEYCODE_HOME */ 44 SDL_SCANCODE_AC_HOME, /* AKEYCODE_HOME */
45 SDL_SCANCODE_AC_BACK, /* AKEYCODE_BACK */ 45 SDL_SCANCODE_AC_BACK, /* AKEYCODE_BACK */
149 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_START */ 149 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_START */
150 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_SELECT */ 150 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_SELECT */
151 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_MODE */ 151 SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BUTTON_MODE */
152 }; 152 };
153 153
154 static SDL_ScanCode 154 static SDL_Scancode
155 TranslateKeycode(int keycode) 155 TranslateKeycode(int keycode)
156 { 156 {
157 SDL_ScanCode scancode = SDL_SCANCODE_UNKNOWN; 157 SDL_Scancode scancode = SDL_SCANCODE_UNKNOWN;
158 158
159 if (keycode < SDL_arraysize(Android_Keycodes)) { 159 if (keycode < SDL_arraysize(Android_Keycodes)) {
160 scancode = Android_Keycodes[keycode]; 160 scancode = Android_Keycodes[keycode];
161 } 161 }
162 if (scancode == SDL_SCANCODE_UNKNOWN) { 162 if (scancode == SDL_SCANCODE_UNKNOWN) {