-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.0.91 breaks ALT+key
on wayvnc
#377
Comments
Which client platform are you using? |
Sorry, forgot to mention, its macos with a default en_US locale on both client and server. Im happy to create a detailed ticket on the wayvnc side, but I wanted to touch base here first. Also, previously broken 'ctrl+shift+back quote' started to work in the new version. |
The main thing that changed between TurboVNC 3.0.3 and 3.1 beta1 vis-a-vis keyboard handling was the implementation of the QEMU Extended Key Event RFB extension. The original RFB protocol handled key events by sending X11 keysyms from client to server, but X11 keysyms depend on the keyboard map (which depends on the locale.) QEMU Extended Key Event allows raw keycodes to be sent from client to server instead, which effectively allows the server to handle keyboard mapping. However, this would only be relevant if wayvnc implements that extension. I'll try to set up wayvnc and reproduce the issue. |
Which compositor are you using? And how did you start the compositor? I don't know anything about wlroots and am having trouble bootstrapping an environment to reproduce the issue. |
The safest way is to start sway headless with software rendering, like so: Default keybindings here https://i3wm.org/docs/refcard.html. Should work anywhere, including VMs, but obviously fairly slow without a GPU. |
On Fedora, the Apparently wayvnc does support the QEMU Extended Key Event extension, so I suspect that the issue is in their implementation of that extension, as the issue is not observed with other VNC servers that implement the extension. You can pass |
NOTE: You can also create a .turbovnc file specifically for your wayvnc connection, set |
After creating an issue for wayvnc the conclusion seems to be that none of the problems exist when using a recent TigerVNC macos client.
Unfortunately the speed of TigerVNC is noticeably slower in my case and would love to have this issue solved.
Not related to this issue, but |
The macOS TigerVNC Viewer has had a severe performance issue for many years, and this has been reported to the TigerVNC developers on multiple occasions. I haven't compared the macOS TigerVNC Viewer with the macOS TurboVNC Viewer since TurboVNC 2.1.x and TigerVNC 1.8.x, but at that time, the TigerVNC Viewer had similar decoding performance to the TurboVNC Viewer (actually faster if you used multithreaded decoding, which TurboVNC doesn't yet support), but its blitting performance was about 11x slower. As to the keyboard issues, both TurboVNC v3.1 beta and TigerVNC v1.13 support the QEMU Extended Key Event extension. That extension allows a raw keyboard scan code to be sent in addition to the X11 keysym. For LAlt-G, TurboVNC sends a sequence of keycode 0x38/keysym 0xffe9 (XK_Alt_L) followed by keycode 0x22/keysym 0x00a9 (XK_copyright). TigerVNC sends a sequence of keycode 0x38/keysym 0xff7e (XK_Mode_switch) followed by keycode 0x22/keysym 0x00a9 (XK_copyright). IMHO, TigerVNC isn't behaving correctly, because the left Alt key would produce an XK_Alt_L keysym if that key was fired on a local X session running on the server machine. Regardless, the VNC server is supposed to use the raw scan code along with the server-side keyboard map to determine the keyboard symbol or modifier. The X11 keysym is only a hint, and in the case of Wayland, the VNC server should arguably ignore the X11 keysym, since X11 keysyms probably aren't relevant for Wayland. However, WayVNC doesn't appear to ignore the X11 keysym. Thus, even though TurboVNC sends exactly the same keycodes as TigerVNC, apparently WayVNC looks at the X11 keysym and thus interprets the left Alt key differently. Curiously, the RAlt-G key sequence produces the same error when sent from TurboVNC, even though in that case TurboVNC sends exactly the same keycodes and keysyms as TigerVNC. (The error doesn't occur when using TigerVNC.) As far as I can tell, TurboVNC isn't doing anything wrong. As for Ctrl-Shift-`, the TurboVNC v3.0.x Viewer (or the TurboVNC v3.1.x Viewer with the tl;dr: I still assert that WayVNC's behavior is at the core of the issue. It just works accidentally with TigerVNC because WayVNC pays attention to the X11 keysym that is sent along with the keycode, but arguably it shouldn't.
It works if you specify it as |
I am investigating this further at the source code level, since I realized that the keyboard handling is part of neatvnc, not wayvnc. I will let you know what I find. |
The QEMU and VMware LED State RFB extensions synchronize the lock key states between the client and the VNC server, but those extensions aren't strictly necessary when using the QEMU Extended Key Event RFB extension. More specifically, wayvnc/neatvnc supports the QEMU Extended Key Event extension but not the LED State extensions, so the TurboVNC Viewer was silently falling back and sending regular RFB key events to wayvnc. This commit causes the TurboVNC Viewer to emulate the behavior of the TigerVNC Viewer, which allows the use of the QEMU Extended Key Event extension even if no LED State extension is available. This is a non-issue when using the TurboVNC Viewer with the TurboVNC Server, which supports the LED State extensions. With wayvnc and other VNC servers that support the QEMU Extended Key Event extension but not the LED State extensions, it means that the lock key state on the client will lose synchronization with the lock key state on the remote desktop if a lock key is pressed outside of the TurboVNC Viewer window. (The same is true when using the TigerVNC Viewer with wayvnc.) Fixes #377
Mystery solved and bug fixed. Refer to b4fd6ae for details. |
I can confirm that all the problematic key combos are now working on Thanks! |
v3.0.91 breaks
ALT+key
on wayvnc.Not sure whos fault is that, but thats what Im getting on
alt+g
oralt+5
:Works well in
v3.0.3
.wayvnc https://github.com/any1/wayvnc
Thanks
The text was updated successfully, but these errors were encountered: