Add support for the Meta/Super/Windows key on macOS and Linux
This commit is contained in:
parent
c6638a7154
commit
d853782fea
2 changed files with 14 additions and 1 deletions
|
|
@ -321,6 +321,9 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event)
|
|||
if (event->keysym.mod & KMOD_SHIFT) {
|
||||
modifiers |= MODIFIER_SHIFT;
|
||||
}
|
||||
if (event->keysym.mod & KMOD_GUI) {
|
||||
modifiers |= MODIFIER_META;
|
||||
}
|
||||
|
||||
// Set keycode. We explicitly use scancode here because GFE will try to correct
|
||||
// for AZERTY layouts on the host but it depends on receiving VK_ values matching
|
||||
|
|
@ -461,6 +464,16 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event)
|
|||
case SDL_SCANCODE_RALT:
|
||||
keyCode = 0xA5;
|
||||
break;
|
||||
// Until we can fully capture these on Windows, we should avoid
|
||||
// passing them through to the host.
|
||||
#ifndef Q_OS_WIN
|
||||
case SDL_SCANCODE_LGUI:
|
||||
keyCode = 0x5B;
|
||||
break;
|
||||
case SDL_SCANCODE_RGUI:
|
||||
keyCode = 0x5C;
|
||||
break;
|
||||
#endif
|
||||
case SDL_SCANCODE_AC_BACK:
|
||||
keyCode = 0xA6;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e60a7ef75f02559e7c5271f4e08f815af5f4a8cc
|
||||
Subproject commit cfeb0ffd90992ee0fa4b6b4a179652e3e2786873
|
||||
Loading…
Add table
Add a link
Reference in a new issue