Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

When pressing the keys Ctrl, Shift and etc on the server side is constantly pressed and released

Here you will find help for frequently asked questions as well as for your specific question
Post Reply
laghatelyan
Posts: 2
Joined: 2022-04-04 17:28

When pressing the keys Ctrl, Shift and etc on the server side is constantly pressed and released

Post by laghatelyan »

I use a certain program in RHEL 7 and RHEL 8 under wine and noticed such a feature that when holding down the ctrl key in RHEL 8 sometimes it is not processed (for example, open a new tab (Ctrl + mouse click)).

Did a little research and found that the issue occurs starting with tigervnc-server 1.9.0, possibly due to "Alternative, "raw" keyboard mode in the native client and all servers" (https://github.com/TigerVNC/tigervnc/releases).

Regardless, I also found a workaround to solve my problem, but I'm afraid it will break something else.
The workaround is to enable the Japanese keyboard in the UltraVNC client.
With the Japanese keyboard enabled, I don’t see my problem, but in "xev" I see a single press, and not a lot of "press release".

I would like to understand if the problem is related to UltraVNC, TigerVNC or the application I am using?

Here is the XEV log without the Japanese keyboard:

Code: Select all

KeyPress event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499643, (883,496), root:(933,611),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499670, (883,496), root:(933,611),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499670, (883,496), root:(933,611),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499701, (883,496), root:(933,611),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499701, (883,496), root:(933,611),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499736, (883,496), root:(933,611),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499736, (883,496), root:(933,611),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499761, (883,496), root:(933,611),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499761, (883,496), root:(933,611),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196499774, (883,496), root:(933,611),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
and with Japanese keyboard:

Code: Select all

KeyPress event, serial 30, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196551230, (200,4), root:(250,119),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x1a00001,
    root 0x31c, subw 0x0, time 2196557882, (200,4), root:(250,119),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
laghatelyan
Posts: 2
Joined: 2022-04-04 17:28

Re: When pressing the keys Ctrl, Shift and etc on the server side is constantly pressed and released

Post by laghatelyan »

I also noticed that if the client is running in debug mode and the Japanese keyboard is enabled, the log is interrupted by the following message:

Code: Select all

rdr::Exception (1): rdr::SystemException: read: Unknown error (10004)
Here is the full log:

Code: Select all

Started and Winsock (v 2) initialised
bufsize expanded to 4352
Registered connection with app
Saving to C:\Users\USER\AppData\Roaming\UltraVNC\options.vnc
DPI 96
Reset keyboard for first use
Flush dead key gives: 1 character(s): 0x0020 ( )
Connected to SERVER port 5905
DSMPlugin not enabled
RFB server supports protocol version 3.8
Connected to RFB server, using protocol version 3.8
VNC authentication succeeded
Read a 43-byte string
Desktop name "SERVER:5 (USER) "
Geometry 1536 x 801 depth 24
Screen work area is 1680 x 1010
Reset keyboard for first use
Flush dead key gives: 1 character(s): 0x0020 ( )
Clipboard changed
Ignore Clipboard while initializing!
No next window in chain; WM_DRAWCLIPBOARD will not be passed
SetClipboardViewer to 0x0017091a; next is 0x0001023c. Last error 0x00000000Screen work area is 1680 x 1010
Update-processing thread started
Screen work area is 1680 x 1010
Screen work area is 1680 x 1010
Receiving cursor shape update, cursor 0x0
Receiving cursor shape update, cursor 8x20
bufsize expanded to 8448
Receiving cursor shape update, cursor 15x21
Receiving cursor shape update, cursor 15x21
rdr::Exception (1): rdr::SystemException: read: Unknown error (10004)
Update-processing thread finishing
WndProchwnd ChangeClipboardChain hwnd 0x0017091a / m_hwndcn 0x0017091a, 0x00000000 (1)
Deregistered connection from app
Exiting
VNC viewer closing down
Post Reply