mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
Renamed SDLK_a-z to SDLK_A-Z
Made the symbols uppercase for consistency with the other SDLK_* constants, but the values are still lowercase.
This commit is contained in:
@@ -257,8 +257,8 @@ SDL_Scancode SDL_GetDefaultScancodeFromKey(SDL_Keycode key, SDL_Keymod *modstate
|
||||
return (SDL_Scancode)(key & ~SDLK_SCANCODE_MASK);
|
||||
}
|
||||
|
||||
if (key >= SDLK_a && key <= SDLK_z) {
|
||||
return (SDL_Scancode)(SDL_SCANCODE_A + key - SDLK_a);
|
||||
if (key >= SDLK_A && key <= SDLK_Z) {
|
||||
return (SDL_Scancode)(SDL_SCANCODE_A + key - SDLK_A);
|
||||
}
|
||||
|
||||
if (key >= 'A' && key <= 'Z') {
|
||||
|
||||
@@ -2206,7 +2206,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_o:
|
||||
case SDLK_O:
|
||||
if (withControl) {
|
||||
/* Ctrl-O (or Ctrl-Shift-O) changes window opacity. */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2223,7 +2223,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_h:
|
||||
case SDLK_H:
|
||||
if (withControl) {
|
||||
/* Ctrl-H changes cursor visibility. */
|
||||
if (SDL_CursorVisible()) {
|
||||
@@ -2233,7 +2233,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_c:
|
||||
case SDLK_C:
|
||||
if (withAlt) {
|
||||
/* Alt-C copy awesome text to the primary selection! */
|
||||
SDL_SetPrimarySelectionText("SDL rocks!\nYou know it!");
|
||||
@@ -2258,7 +2258,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDLK_v:
|
||||
case SDLK_V:
|
||||
if (withAlt) {
|
||||
/* Alt-V paste awesome text from the primary selection! */
|
||||
char *text = SDL_GetPrimarySelectionText();
|
||||
@@ -2285,7 +2285,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_f:
|
||||
case SDLK_F:
|
||||
if (withControl) {
|
||||
/* Ctrl-F flash the window */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2294,7 +2294,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_g:
|
||||
case SDLK_G:
|
||||
if (withControl) {
|
||||
/* Ctrl-G toggle mouse grab */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2303,7 +2303,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_k:
|
||||
case SDLK_K:
|
||||
if (withControl) {
|
||||
/* Ctrl-K toggle keyboard grab */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2312,7 +2312,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_m:
|
||||
case SDLK_M:
|
||||
if (withControl) {
|
||||
/* Ctrl-M maximize */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2334,13 +2334,13 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_r:
|
||||
case SDLK_R:
|
||||
if (withControl) {
|
||||
/* Ctrl-R toggle mouse relative mode */
|
||||
SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode());
|
||||
}
|
||||
break;
|
||||
case SDLK_t:
|
||||
case SDLK_T:
|
||||
if (withControl) {
|
||||
/* Ctrl-T toggle topmost mode */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2354,7 +2354,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_z:
|
||||
case SDLK_Z:
|
||||
if (withControl) {
|
||||
/* Ctrl-Z minimize */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2393,7 +2393,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
|
||||
break;
|
||||
case SDLK_b:
|
||||
case SDLK_B:
|
||||
if (withControl) {
|
||||
/* Ctrl-B toggle window border */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
@@ -2404,7 +2404,7 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_a:
|
||||
case SDLK_A:
|
||||
if (withControl) {
|
||||
/* Ctrl-A toggle aspect ratio */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
|
||||
@@ -104,32 +104,32 @@ static const SDL_Keycode emscripten_keycode_table[] = {
|
||||
/* 62 */ SDLK_UNKNOWN,
|
||||
/* 63 */ SDLK_MINUS,
|
||||
/* 64 */ SDLK_UNKNOWN,
|
||||
/* 65 */ SDLK_a,
|
||||
/* 66 */ SDLK_b,
|
||||
/* 67 */ SDLK_c,
|
||||
/* 68 */ SDLK_d,
|
||||
/* 69 */ SDLK_e,
|
||||
/* 70 */ SDLK_f,
|
||||
/* 71 */ SDLK_g,
|
||||
/* 72 */ SDLK_h,
|
||||
/* 73 */ SDLK_i,
|
||||
/* 74 */ SDLK_j,
|
||||
/* 75 */ SDLK_k,
|
||||
/* 76 */ SDLK_l,
|
||||
/* 77 */ SDLK_m,
|
||||
/* 78 */ SDLK_n,
|
||||
/* 79 */ SDLK_o,
|
||||
/* 80 */ SDLK_p,
|
||||
/* 81 */ SDLK_q,
|
||||
/* 82 */ SDLK_r,
|
||||
/* 83 */ SDLK_s,
|
||||
/* 84 */ SDLK_t,
|
||||
/* 85 */ SDLK_u,
|
||||
/* 86 */ SDLK_v,
|
||||
/* 87 */ SDLK_w,
|
||||
/* 88 */ SDLK_x,
|
||||
/* 89 */ SDLK_y,
|
||||
/* 90 */ SDLK_z,
|
||||
/* 65 */ SDLK_A,
|
||||
/* 66 */ SDLK_B,
|
||||
/* 67 */ SDLK_C,
|
||||
/* 68 */ SDLK_D,
|
||||
/* 69 */ SDLK_E,
|
||||
/* 70 */ SDLK_F,
|
||||
/* 71 */ SDLK_G,
|
||||
/* 72 */ SDLK_H,
|
||||
/* 73 */ SDLK_I,
|
||||
/* 74 */ SDLK_J,
|
||||
/* 75 */ SDLK_K,
|
||||
/* 76 */ SDLK_L,
|
||||
/* 77 */ SDLK_M,
|
||||
/* 78 */ SDLK_N,
|
||||
/* 79 */ SDLK_O,
|
||||
/* 80 */ SDLK_P,
|
||||
/* 81 */ SDLK_Q,
|
||||
/* 82 */ SDLK_R,
|
||||
/* 83 */ SDLK_S,
|
||||
/* 84 */ SDLK_T,
|
||||
/* 85 */ SDLK_U,
|
||||
/* 86 */ SDLK_V,
|
||||
/* 87 */ SDLK_W,
|
||||
/* 88 */ SDLK_X,
|
||||
/* 89 */ SDLK_Y,
|
||||
/* 90 */ SDLK_Z,
|
||||
/* 91 */ SDLK_LGUI,
|
||||
/* 92 */ SDLK_UNKNOWN,
|
||||
/* 93 */ SDLK_APPLICATION,
|
||||
|
||||
Reference in New Issue
Block a user