From 91b224d0c42a776b4d1c49c3cec84688879928e9 Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Mon, 27 Feb 2023 17:51:18 +0000 Subject: [PATCH] CP-41775: Fix using Hanja/Hangeul keys over VNC Signed-off-by: Ross Lagerwall --- XenAdmin/VNC/KeyMap.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/XenAdmin/VNC/KeyMap.cs b/XenAdmin/VNC/KeyMap.cs index af5d83c56..f0c87276a 100644 --- a/XenAdmin/VNC/KeyMap.cs +++ b/XenAdmin/VNC/KeyMap.cs @@ -192,6 +192,8 @@ namespace DotNetVnc private const int RIGHT_SHIFT_SCAN = 54; private const int NUM_LOCK_SCAN = 69; + private const int HANJA_SCAN = 0xf1; + private const int HANGEUL_SCAN = 0xf2; private static int HookCallback(int nCode, int wParam, KBDLLHOOKSTRUCT* lParam) { @@ -222,6 +224,16 @@ namespace DotNetVnc case RIGHT_SHIFT_SCAN: case NUM_LOCK_SCAN: break; + /* QEMU expects "QNum" scancodes on the wire and these + * are different for the Hanja and Hangeul keys. Update + * accordingly. + */ + case HANJA_SCAN: + scanCode = 0x71; + break; + case HANGEUL_SCAN: + scanCode = 0x72; + break; default: /* 128 is added to scanCode to differentiate * an extended key. Scan code for all extended keys