keybindings config not working
Opened this issue · 3 comments
Is there an existing issue for this?
- I have searched the existing issues
Is your issue described in the documentation?
- I have read the documentation
Is your issue present in the latest beta/pre-release?
This issue is present in the latest pre-release
Describe the Bug
I added the following lines to sunshine.conf
as the documentation said in https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/advanced_usage.html#keybindings
keybindings = [ 0x10, 0xA0, 0x11, 0xA2, 0x12, 0xA4, 0x4A, 0x4B ]
After a restart of sunshine, nothing happened. Then I tried to set always_send_scancodes
to enabled
or disabled
, neither workd.
Expected Behavior
As far as I think, this config should remap j
to k
, so when I press j
a k should appear on my text editor. However when I press j
a j appears, and when I press k
a k appears.
Additional Context
No response
Host Operating System
Windows
Operating System Version
Windows 10 Professional 22H2, version 19045.5011
Architecture
amd64/x86_64
Sunshine commit or version
Version v2024.1007.214114
Package
Windows - installer (recommended)
GPU Type
Nvidia
GPU Model
Nvidia GeForce RTX 3060 Laptop GPU
GPU Driver/Mesa Version
565.90
Capture Method
Desktop Duplication API (Windows)
Config
locale = zh
lan_encryption_mode = 1
origin_web_ui_allowed = pc
channels = 2
nvenc_realtime_hags = disabled
#always_send_scancodes = disabled
keybindings = [
0x10, 0xA0,
0x11, 0xA2,
0x12, 0xA4,
0x4A, 0x4B
]
Apps
No response
Relevant log output
No relevant log output is found.
I have the same issues - Using sunshine with non-QWERTY keyboard is a pain, in particular for anything that needs accurate keyboard input (like coding, editing text, etc..). This is a huge drawback
I'm having the same issue. I tried rebinding the option and cmd key on Mac for a windows host. However the config does not work.
Relevant part in sunshine.conf:
keybindings = [ 0x5B, 0xA2, 0x5C, 0xA3, 0xA2, 0x5B, 0xA3, 0x5C ]
However no change in behavior.
MacOS keyboard support has been generally broken for me. I have had to fix many issues in my own fork. This particular problem is due to a subtle issue with the config parser. The skip_list
method consumes too many characters and will never parse the list correctly.
If you're building from source and want to fix it yourself, you can update the skip_list
implementation in src/config.cpp
with this:
template <class It>
It
skip_list(It skipper, It end) {
int stack = 1;
while (skipper != end) {
if (*skipper == '[') {
++stack;
}
if (*skipper == ']') {
--stack;
if (stack == 0) {
break; // Stop here since we've found the matching closing bracket
}
}
++skipper;
}
return skipper;
}
It works for my needs, but be warned I have not tested this on other platforms nor do I fully understand other effects this may have on other config items. I just wanted to swap Option and Command (Windows and Alt) and this was the fastest way to do that.