diff --git a/app/streaming/input/keyboard.cpp b/app/streaming/input/keyboard.cpp index 8a0d461d..e2e1b7ab 100644 --- a/app/streaming/input/keyboard.cpp +++ b/app/streaming/input/keyboard.cpp @@ -104,6 +104,20 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) raiseAllKeys(); return; } + // Check for mouse show combo (Ctrl+Alt+Shift+C) + else if (event->keysym.sym == SDLK_c) { + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Detected show mouse combo (SDLK)"); + + if (!SDL_GetRelativeMouseMode()) { + SDL_ShowCursor(!SDL_ShowCursor(SDL_QUERY)); + } + else { + SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, + "Cursor can only be shown in remote desktop mouse mode"); + } + return; + } // Check for quit combo (Ctrl+Alt+Shift+Q) else if (event->keysym.scancode == SDL_SCANCODE_Q) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, @@ -168,6 +182,20 @@ void SdlInputHandler::handleKeyEvent(SDL_KeyboardEvent* event) raiseAllKeys(); return; } + // Check for mouse show combo (Ctrl+Alt+Shift+C) + else if (event->keysym.sym == SDL_SCANCODE_C) { + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, + "Detected show mouse combo (scancode)"); + + if (!SDL_GetRelativeMouseMode()) { + SDL_ShowCursor(!SDL_ShowCursor(SDL_QUERY)); + } + else { + SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, + "Cursor can only be shown in remote desktop mouse mode"); + } + return; + } } if (event->repeat) {