mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-21 17:00:46 +00:00
Merge pull request #1150 from amalchuk/feature/keyboard-improvements
Fix Windows key bind name on non-Mac
This commit is contained in:
commit
7c88889716
2 changed files with 19 additions and 9 deletions
|
@ -236,10 +236,17 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
case SDLK_BACKSPACE:
|
||||
key = K_BACKSPACE;
|
||||
break;
|
||||
case SDLK_LGUI:
|
||||
#ifdef __APPLE__
|
||||
case SDLK_RGUI:
|
||||
key = K_COMMAND; // Win key
|
||||
case SDLK_LGUI:
|
||||
key = K_COMMAND;
|
||||
break;
|
||||
#else
|
||||
case SDLK_RGUI:
|
||||
case SDLK_LGUI:
|
||||
key = K_SUPER;
|
||||
break;
|
||||
#endif
|
||||
case SDLK_CAPSLOCK:
|
||||
key = K_CAPSLOCK;
|
||||
break;
|
||||
|
@ -395,8 +402,6 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
key = K_KP_EQUALS;
|
||||
break;
|
||||
|
||||
// TODO: K_SUPER ? Win Key is already K_COMMAND
|
||||
|
||||
case SDLK_APPLICATION:
|
||||
key = K_COMPOSE;
|
||||
break;
|
||||
|
@ -663,7 +668,7 @@ IN_Update(void)
|
|||
event.window.event == SDL_WINDOWEVENT_FOCUS_GAINED)
|
||||
{
|
||||
Key_MarkAllUp();
|
||||
|
||||
|
||||
if (event.window.event == SDL_WINDOWEVENT_FOCUS_LOST)
|
||||
{
|
||||
S_Activate(false);
|
||||
|
|
|
@ -226,10 +226,17 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
case SDLK_BACKSPACE:
|
||||
key = K_BACKSPACE;
|
||||
break;
|
||||
case SDLK_LGUI:
|
||||
#ifdef __APPLE__
|
||||
case SDLK_RGUI:
|
||||
key = K_COMMAND; // Win key
|
||||
case SDLK_LGUI:
|
||||
key = K_COMMAND;
|
||||
break;
|
||||
#else
|
||||
case SDLK_RGUI:
|
||||
case SDLK_LGUI:
|
||||
key = K_SUPER;
|
||||
break;
|
||||
#endif
|
||||
case SDLK_CAPSLOCK:
|
||||
key = K_CAPSLOCK;
|
||||
break;
|
||||
|
@ -385,8 +392,6 @@ IN_TranslateSDLtoQ2Key(unsigned int keysym)
|
|||
key = K_KP_EQUALS;
|
||||
break;
|
||||
|
||||
// TODO: K_SUPER ? Win Key is already K_COMMAND
|
||||
|
||||
case SDLK_APPLICATION:
|
||||
key = K_COMPOSE;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue