From 041e901c6118ee68c21d56d2f1a622856a25f28c Mon Sep 17 00:00:00 2001 From: konst2 Date: Wed, 13 Feb 2019 19:56:44 +0300 Subject: [PATCH] Fix hotkeys for non-latin keyboard layouts --- app/streaming/input.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/streaming/input.cpp b/app/streaming/input.cpp index e6993081..b00337af 100644 --- a/app/streaming/input.cpp +++ b/app/streaming/input.cpp @@ -140,7 +140,7 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) (event->keysym.mod & KMOD_ALT) && (event->keysym.mod & KMOD_SHIFT)) { // Check for quit combo (Ctrl+Alt+Shift+Q) - if (event->keysym.sym == SDLK_q) { + if (event->keysym.scancode == SDL_SCANCODE_Q) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected quit key combo"); @@ -152,7 +152,7 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) return; } // Check for the unbind combo (Ctrl+Alt+Shift+Z) - else if (event->keysym.sym == SDLK_z) { + else if (event->keysym.scancode == SDL_SCANCODE_Z) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected mouse capture toggle combo"); @@ -165,7 +165,7 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) return; } // Check for the full-screen combo (Ctrl+Alt+Shift+X) - else if (event->keysym.sym == SDLK_x) { + else if (event->keysym.scancode == SDL_SCANCODE_X) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected full-screen toggle combo"); Session::s_ActiveSession->toggleFullscreen(); @@ -175,7 +175,7 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) raiseAllKeys(); return; } - else if (event->keysym.sym == SDLK_s) { + else if (event->keysym.scancode == SDL_SCANCODE_S) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected stats toggle combo");