From d7fd578cc35d14577d33f7301f0e241b28b38d06 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 28 Apr 2020 20:06:30 -0700 Subject: [PATCH] Don't set MODIFIER_META when meta key is disabled --- app/streaming/input.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/streaming/input.cpp b/app/streaming/input.cpp index e77a7a79..f1ff928d 100644 --- a/app/streaming/input.cpp +++ b/app/streaming/input.cpp @@ -20,6 +20,10 @@ #define VK_NUMPAD0 0x60 #endif +// Until we can fully capture these on all platforms (without conflicting with +// OS-provided shortcuts), we should avoid passing them through to the host. +//#define ENABLE_META + #define MOUSE_POLLING_INTERVAL 5 // How long the fingers must be stationary to start a right click @@ -371,9 +375,11 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) if (event->keysym.mod & KMOD_SHIFT) { modifiers |= MODIFIER_SHIFT; } +#ifdef ENABLE_META if (event->keysym.mod & KMOD_GUI) { modifiers |= MODIFIER_META; } +#endif // 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 @@ -514,9 +520,7 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) case SDL_SCANCODE_RALT: keyCode = 0xA5; break; - // Until we can fully capture these on all platforms (without conflicting with - // OS-provided shortcuts), we should avoid passing them through to the host. - #if 0 + #ifdef ENABLE_META case SDL_SCANCODE_LGUI: keyCode = 0x5B; break;