Add Ctrl+Alt+Shift+Down Arrow shortcut to minimize

This commit is contained in:
Cameron Gutman 2021-01-21 19:39:17 -06:00
commit d38ff5759a

View file

@ -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)");