From d38ff5759af051879eff1e426f35214c62639453 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 21 Jan 2021 19:39:17 -0600 Subject: [PATCH] Add Ctrl+Alt+Shift+Down Arrow shortcut to minimize --- app/streaming/input/keyboard.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/streaming/input/keyboard.cpp b/app/streaming/input/keyboard.cpp index 1502ceb0..2edd83f3 100644 --- a/app/streaming/input/keyboard.cpp +++ b/app/streaming/input/keyboard.cpp @@ -86,6 +86,14 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) raiseAllKeys(); return; } + // Check for the mouse mode toggle combo (Ctrl+Alt+Shift+DownArrow) unless on EGLFS which has no window manager + else if (event->keysym.sym == SDLK_DOWN && QGuiApplication::platformName() != "eglfs") { + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Detected minimize combo (SDLK)"); + + SDL_MinimizeWindow(m_Window); + return; + } // Check for overlay combo (Ctrl+Alt+Shift+S) else if (event->keysym.sym == SDLK_s) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, @@ -165,6 +173,14 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) setCaptureActive(true); return; } + // Check for the mouse mode toggle combo (Ctrl+Alt+Shift+DownArrow) unless on EGLFS which has no window manager + else if (event->keysym.scancode == SDL_SCANCODE_DOWN && QGuiApplication::platformName() != "eglfs") { + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Detected minimize combo (scancode)"); + + SDL_MinimizeWindow(m_Window); + return; + } else if (event->keysym.scancode == SDL_SCANCODE_S) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected stats toggle combo (scancode)");