Skip to content
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

Unable to correctly retrieve the status of the Shift key #1876

Open
Jondoe398 opened this issue Nov 21, 2024 · 1 comment
Open

Unable to correctly retrieve the status of the Shift key #1876

Jondoe398 opened this issue Nov 21, 2024 · 1 comment

Comments

@Jondoe398
Copy link

Jondoe398 commented Nov 21, 2024

I used x0vncserver to start VNC and control the device. When entering the password in the terminal window and attempting to type the '@' symbol, the desktop freezes.

Tue Nov 19 11:38:28 2024
 XDesktop:    Allocated shared memory image
 VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888

Tue Nov 19 11:39:06 2024
 XDesktop:    Added unknown keysym at to keycode 253
X connection to :0 broken (explicit kill or server shutdown).

I tried to output more information and found that when typing '@', XkbStateMods did not correctly retrieve the Shift state, causing a remapped key to be used to produce '@'.Partial output is as follows:

Wed Nov 20 16:28:10 2024
 XDesktop:    keycode 0 , xtcode 0, keysym 0xffe1, Shift_L
 XDesktop:    XkbTranslateKeyCode mods 16,out_mods 0
 XDesktop:    XkbTranslateKeyCode keycode 0x0008,cursym 0x0000,keysym 0xffe1
 XDesktop:    XkbTranslateKeyCode keycode '(null)',cursym '(null)',keysym'Shift_L'
		.
		.
		.
		.
 XDesktop:    XkbTranslateKeyCode mods 16,out_mods 1
 XDesktop:    XkbTranslateKeyCode keycode 0x0031,cursym 0x0060,keysym 0xffe1
 XDesktop:    XkbTranslateKeyCode keycode '1',cursym 'grave',keysym 'Shift_L'
 XDesktop:    XkbTranslateKeyCode mods 16,out_mods 0
 XDesktop:    XkbTranslateKeyCode keycode 0x0032,cursym 0xffe1,keysym 0xffe1
 XDesktop:    XkbTranslateKeyCode keycode '2',cursym 'Shift_L',keysym 'Shift_L'
 XDesktop:    XkbKeysymToKeycode keycode '50'
 XDesktop:    keycode 0 , xtcode 0, keysym 0x0040, at
 XDesktop:    XkbTranslateKeyCode mods 16,out_mods 0
 XDesktop:    XkbTranslateKeyCode keycode 0x0008,cursym 0x0000,keysym 0x0040
 XDesktop:    XkbTranslateKeyCode keycode '(null)',cursym '(null)',keysym 'at'
		.
		.
		.
		.
 XDesktop:    XkbTranslateKeyCode mods 16,out_mods 0
 XDesktop:    XkbTranslateKeyCode keycode 0x00ff,cursym 0x1008ffb5,keysym 0x0040
 XDesktop:    XkbTranslateKeyCode keycode 'ydiaeresis',cursym 'XF86RFKill',keysym 'at'
 XDesktop:    XkbKeysymToKeycode keycode '256'
 XDesktop:    Added unknown keysym XK_at (0x0040) to keycode 253

I can only try to make the following judgment after the XkbTranslateKeyCode loop ends (keycode == 0 && !(mods & ShiftMask)), then set mods |= ShiftMask, and perform the XkbTranslateKeyCode loop once again.

TigerVNC Server version 1.14.80, built Nov 21 2024 08:58:52
4.19.71-arm64-desktop #52.57030 SMP PREEMPT Mon Jan 9 15:36:53 CST 2023 aarch64 GNU/Linux
CPU Kirin990
@CendioOssman
Copy link
Member

I'm afraid I cannot reproduce your issue. Please fill out the bug issue template properly so we can understand your setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants