TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
746 stars 136 forks source link

TurboVNC viewer on Windows sends Scroll_Lock press+release events before each keypress #386

Closed perweij closed 7 months ago

perweij commented 7 months ago

I noticed something strange. Having used TurboVNC viewer on GNU/Linux for a long time without issues, I installed it on a Windows computer. Maybe I'm just incompetent in using Windows, or this is a software issue of some sort.

I connected to a VNC server (remote server running GNU/Linux) without issues and started working.

In the remote session, GNU Emacs behaved strangely in that it did not recognise key sequences correctly (for example open file: Ctrl-x followed by Ctrl-f). I commanded Emacs to show the most recent key press log, and saw that every second line was Scroll_lock, which I had not pressed myself.

I proceeded to run xev, to show the X11 events, and pressed some keys, for example Ctrl-x followed by Ctrl-f. And there the Scroll_lock events turned up too: if I press for example "a", Ctrl or any key, I first get Key press Scroll_lock, key release Scroll_lock, followed by the expected Key press "a", key release "a" for example.

For this particular server, for network/security policy reasons I can't verify the behavior with a GNU/Linux client, which would have been a good test to triangulate the error. I can only conclude that I have not encountered this error before when connecting from GNU/Linux to GNU/Linux with TurboVNC.

The client OS is Windows 10. Client is running TurboVNC 3.1. Server is running Ubuntu 22.04.3 LTS, TurboVNC 3.0.92-20231102.

dcommander commented 7 months ago

I'll try to reproduce it. The new keyboard handler in TurboVNC 3.1 synchronizes the lock key state between client and server, so it can inject a ScrollLock event in the TurboVNC session if ScrollLock is engaged on the client but not in the TurboVNC session. However, that should be a one-time thing. It shouldn't be occurring with every key press.

perweij commented 7 months ago

Hm, I don't understand it. Today it works again, without the Scroll_lock events - really strange. The only thing I did was restarting Windows.

Let's close this issue, it was probably Windows' fault.

dcommander commented 7 months ago

If it resurfaces and you can reliably reproduce it, let me know.