mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Add support for the Meta/Super/Windows key on macOS and Linux
This commit is contained in:
@@ -321,6 +321,9 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event)
|
|||||||
if (event->keysym.mod & KMOD_SHIFT) {
|
if (event->keysym.mod & KMOD_SHIFT) {
|
||||||
modifiers |= MODIFIER_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
|
// 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
|
// 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:
|
case SDL_SCANCODE_RALT:
|
||||||
keyCode = 0xA5;
|
keyCode = 0xA5;
|
||||||
break;
|
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:
|
case SDL_SCANCODE_AC_BACK:
|
||||||
keyCode = 0xA6;
|
keyCode = 0xA6;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Submodule moonlight-common-c/moonlight-common-c updated: e60a7ef75f...cfeb0ffd90
Reference in New Issue
Block a user