Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit f7abe6a

Browse files
rosslagerwallkc284
authored andcommitted
CP-41775: Fix using Hanja/Hangeul keys over VNC
Signed-off-by: Ross Lagerwall <[email protected]>
1 parent 1257a8a commit f7abe6a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

XenAdmin/VNC/KeyMap.cs

+12
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ private static IntPtr SetHook(LowLevelKeyboardProc proc)
193193

194194
private const int RIGHT_SHIFT_SCAN = 54;
195195
private const int NUM_LOCK_SCAN = 69;
196+
private const int HANJA_SCAN = 0xf1;
197+
private const int HANGEUL_SCAN = 0xf2;
196198

197199
private static int HookCallback(int nCode, int wParam, KBDLLHOOKSTRUCT* lParam)
198200
{
@@ -223,6 +225,16 @@ private static int HookCallback(int nCode, int wParam, KBDLLHOOKSTRUCT* lParam)
223225
case RIGHT_SHIFT_SCAN:
224226
case NUM_LOCK_SCAN:
225227
break;
228+
/* QEMU expects "QNum" scancodes on the wire and these
229+
* are different for the Hanja and Hangeul keys. Update
230+
* accordingly.
231+
*/
232+
case HANJA_SCAN:
233+
scanCode = 0x71;
234+
break;
235+
case HANGEUL_SCAN:
236+
scanCode = 0x72;
237+
break;
226238
default:
227239
/* 128 is added to scanCode to differentiate
228240
* an extended key. Scan code for all extended keys

0 commit comments

Comments
 (0)