Public bug reported:
[Description]
When Windows mstsc with a Korean keyboard connects to GNOME Remote Desktop on
Ubuntu 26.04, these keys do nothing in the remote session:
* Right Alt (Hangul, the Korean/English toggle) and Right Ctrl (Hanja)
* Numpad 0-9 and numpad decimal (numpad / * - + and Enter work)
All other keys work. The same client works against a Windows RDP server.
[Versions]
Ubuntu 26.04.1 LTS
libwinpr3-3, libfreerdp3-3: 3.32.2+dfsg-0ubuntu0.26.04.1
gnome-remote-desktop: 50.2-0ubuntu0.1 (desktop sharing, RDP)
Client: Windows mstsc, Korean keyboard (reports keyboard type 8,
WINPR_KBD_TYPE_KOREAN)
[Cause]
gnome-remote-desktop translates each key with
GetVirtualKeyCodeFromVirtualScanCode(scancode, client_keyboard_type)
GetKeycodeFromVirtualKeyCode(vkcode, WINPR_KEYCODE_TYPE_EVDEV)
For keyboard type 8, WinPR 3.32.2 returns virtual keys that its own evdev table
does not contain, so the evdev keycode is 0 and the key is lost:
Right Alt scancode E0 38 -> VK_HANGUL|KBDEXT (0x115) -> evdev 0, expected
122 (KEY_HANGEUL)
Right Ctrl scancode E0 1D -> VK_HANJA|KBDEXT (0x119) -> evdev 0, expected
123 (KEY_HANJA)
Numpad 7 scancode 47 -> VK_HOME (0x24) -> evdev 0, expected
71 (KEY_KP7)
Numpad 0 scancode 52 -> VK_INSERT (0x2D) -> evdev 0, expected
82 (KEY_KP0)
Numpad . scancode 53 -> VK_DELETE (0x2E) -> evdev 0, expected
83 (KEY_KPDOT)
(same for the other numpad digits, scancodes 48-51 except 4A and 4E)
I measured these values on the affected machine by calling the two WinPR
functions directly, and confirmed with a uprobe on the running daemon
that press and release events both arrive with keyboard type 8.
[Upstream fix]
Fixed in FreeRDP 3.33.1; not present in 3.32.2 or 3.33.0. The diff between
3.32.2 and 3.33.1 in winpr/libwinpr/input is small:
* scancode.c: the type 8 table (KBD8T) maps scancodes 47-53 to VK_NUMPAD0..9
and VK_DECIMAL instead of VK_HOME, VK_UP, ...
* keycode.c: the evdev entries for KEY_HANGEUL (122) and KEY_HANJA (123)
become VK_HANGUL|KBDEXT and VK_HANJA|KBDEXT
Related upstream items:
* FreeRDP pull requests #14066 and #14070: "[winpr,input] fix Korean keyboard
(type 8) Hangul/Hanja and numpad mapping"
* gnome-remote-desktop issue #366: "RDP: Korean Hangul key becomes keycode 0"
[Request]
Please update freerdp3 in 26.04 to 3.33.1 or later, or backport these two table
changes.
[Test case]
1. Ubuntu 26.04 (GNOME, Wayland): enable Settings > System > Remote Desktop >
Desktop Sharing, with ibus-hangul configured.
2. From Windows with a Korean keyboard (101-key type 1, Right Alt is the Hangul
key), connect with mstsc.
3. In a text field, press Right Alt: the input mode does not toggle. With
NumLock on, press numpad digits: nothing is typed.
Expected: Right Alt toggles Hangul input and numpad digits are typed.
[Workaround]
Shift+Space toggles Korean input. For the rest I preload a small library into
gnome-remote-desktop-daemon that wraps GetKeycodeFromVirtualKeyCode and retries
the failed lookups; with it, all of the keys above work.
** Affects: freerdp3 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175531
Title:
Korean keyboard (type 8): Hangul/Hanja keys and numpad digits dropped
in RDP server sessions; fixed upstream in FreeRDP 3.33.1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/freerdp3/+bug/2175531/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs