From 76d99cd60e2c332a4822a7a751471c64891b235e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 18 Jul 2018 00:14:12 -0700 Subject: [PATCH] Raise combo keys for all special combos, not just quit --- app/streaming/input.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/streaming/input.cpp b/app/streaming/input.cpp index f4f01cea..fb753890 100644 --- a/app/streaming/input.cpp +++ b/app/streaming/input.cpp @@ -51,20 +51,20 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) (event->keysym.mod & KMOD_ALT) && (event->keysym.mod & KMOD_SHIFT)) { + // Force raise all keys in the combo to avoid + // leaving them down after disconnecting + LiSendKeyboardEvent(0xA0, KEY_ACTION_UP, 0); + LiSendKeyboardEvent(0xA1, KEY_ACTION_UP, 0); + LiSendKeyboardEvent(0xA2, KEY_ACTION_UP, 0); + LiSendKeyboardEvent(0xA3, KEY_ACTION_UP, 0); + LiSendKeyboardEvent(0xA4, KEY_ACTION_UP, 0); + LiSendKeyboardEvent(0xA5, KEY_ACTION_UP, 0); + // Check for quit combo (Ctrl+Alt+Shift+Q) if (event->keysym.sym == SDLK_q) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Detected quit key combo"); - // Force raise all keys in the combo to avoid - // leaving them down after disconnecting - LiSendKeyboardEvent(0xA0, KEY_ACTION_UP, 0); - LiSendKeyboardEvent(0xA1, KEY_ACTION_UP, 0); - LiSendKeyboardEvent(0xA2, KEY_ACTION_UP, 0); - LiSendKeyboardEvent(0xA3, KEY_ACTION_UP, 0); - LiSendKeyboardEvent(0xA4, KEY_ACTION_UP, 0); - LiSendKeyboardEvent(0xA5, KEY_ACTION_UP, 0); - SDL_Event event; // Drain the event queue of any additional input