moonlight-qt icon indicating copy to clipboard operation
moonlight-qt copied to clipboard

Please allow changing moonlight client keybindings

Open shodanx2 opened this issue 2 years ago • 1 comments

Hello,

The current keybindinds are as follows

Ctrl+Alt+Shift+Q - Quit the streaming session (leaving the game running on the host PC)
Ctrl+Alt+Shift+Z - Toggle mouse and keyboard capture
Ctrl+Alt+Shift+X - Toggle between full-screen and windowed mode
Ctrl+Alt+Shift+S - Open performance stats overlay (not supported on Steam Link or Raspberry Pi)
Ctrl+Alt+Shift+M - Toggle mouse mode (pointer capture or direct control)
Ctrl+Alt+Shift+V - Type clipboard text on the host
Ctrl+Alt+Shift+D - Minimize the stream window
Ctrl+Alt+Shift+C - Toggle local cursor display in remote desktop mouse mode (remote cursor will always show up due to GameStream limitations)
Ctrl+Alt+Shift+L - Toggle locking the mouse pointer to the video area (requires "Optimize mouse for remote desktop instead of games" checkbox enabled)

I would like to change Ctrl+Alt+Shift+X to Ctrl+Alt+Shift+F as that is more intuitive to me.

I often confuse X with exiting a program.

shodanx2 avatar Oct 24 '23 12:10 shodanx2

I know this isn't the feature/solution you're looking for, but if you're willing to build moonlight-qt from source, you can apply this patch which changes the toggle fullscreen keybinding to Ctrl+Alt+Shift+F.

--- app/streaming/input/input.cpp.orig
+++ app/streaming/input/input.cpp
@@ -77,8 +77,8 @@ SdlInputHandler::SdlInputHandler(StreamingPreferences& prefs, int streamWidth, i
     m_SpecialKeyCombos[KeyComboUngrabInput].enabled = QGuiApplication::platformName() != "eglfs";
 
     m_SpecialKeyCombos[KeyComboToggleFullScreen].keyCombo = KeyComboToggleFullScreen;
-    m_SpecialKeyCombos[KeyComboToggleFullScreen].keyCode = SDLK_x;
-    m_SpecialKeyCombos[KeyComboToggleFullScreen].scanCode = SDL_SCANCODE_X;
+    m_SpecialKeyCombos[KeyComboToggleFullScreen].keyCode = SDLK_f;
+    m_SpecialKeyCombos[KeyComboToggleFullScreen].scanCode = SDL_SCANCODE_F;
     m_SpecialKeyCombos[KeyComboToggleFullScreen].enabled = QGuiApplication::platformName() != "eglfs";
 
     m_SpecialKeyCombos[KeyComboToggleStatsOverlay].keyCombo = KeyComboToggleStatsOverlay;

I agree with you about the Ctrl+Alt+Shift+F as it's intuitive and mnemonic. Even moonlight-embedded uses that same binding for fullscreen toggle but not this client.

kenrap avatar Aug 30 '24 20:08 kenrap

I know this isn't the feature/solution you're looking for, but if you're willing to build moonlight-qt from source, you can apply this patch which changes the toggle fullscreen keybinding to Ctrl+Alt+Shift+F.

--- app/streaming/input/input.cpp.orig
+++ app/streaming/input/input.cpp
@@ -77,8 +77,8 @@ SdlInputHandler::SdlInputHandler(StreamingPreferences& prefs, int streamWidth, i
     m_SpecialKeyCombos[KeyComboUngrabInput].enabled = QGuiApplication::platformName() != "eglfs";
 
     m_SpecialKeyCombos[KeyComboToggleFullScreen].keyCombo = KeyComboToggleFullScreen;
-    m_SpecialKeyCombos[KeyComboToggleFullScreen].keyCode = SDLK_x;
-    m_SpecialKeyCombos[KeyComboToggleFullScreen].scanCode = SDL_SCANCODE_X;
+    m_SpecialKeyCombos[KeyComboToggleFullScreen].keyCode = SDLK_f;
+    m_SpecialKeyCombos[KeyComboToggleFullScreen].scanCode = SDL_SCANCODE_F;
     m_SpecialKeyCombos[KeyComboToggleFullScreen].enabled = QGuiApplication::platformName() != "eglfs";
 
     m_SpecialKeyCombos[KeyComboToggleStatsOverlay].keyCombo = KeyComboToggleStatsOverlay;

I agree with you about the Ctrl+Alt+Shift+F as it's intuitive and mnemonic. Even moonlight-embedded uses that same binding for fullscreen toggle but not this client.

Have you considered making these interfaces accessible to the front end?

DoiiarX avatar Dec 05 '24 01:12 DoiiarX

I have thought about it but I would have to study its codebase and necessary dependency APIs. And before I can even consider doing that, I don't see any interest here expressed by the project owner. Without that mutual interest, I feel like I would be wasting my time opening up a PR, let alone writing a single line of code.

kenrap avatar Dec 05 '24 02:12 kenrap