From 656205c74f9f64e7c9ecd9a1b90bbf9ecd26100d Mon Sep 17 00:00:00 2001 From: gsittyz Date: Sun, 1 Nov 2020 02:09:04 +0900 Subject: [PATCH] Windows JIS Keyboard Support Added vkey mappings for Japanese keyboards because the special keys for Japanese input do not work on TigerVNC currently. --- vncviewer/win32.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vncviewer/win32.c b/vncviewer/win32.c index 537ff435..4213d3f1 100644 --- a/vncviewer/win32.c +++ b/vncviewer/win32.c @@ -144,6 +144,8 @@ static const int vkey_map[][3] = { { VK_CAPITAL, XK_Caps_Lock, NoSymbol }, /* FIXME: IME keys */ { VK_ESCAPE, XK_Escape, NoSymbol }, + { VK_CONVERT, XK_Henkan, NoSymbol }, + { VK_NONCONVERT, XK_Muhenkan, NoSymbol }, { VK_PRIOR, XK_KP_Prior, XK_Prior }, { VK_NEXT, XK_KP_Next, XK_Next }, { VK_END, XK_KP_End, XK_End }, @@ -216,6 +218,13 @@ static const int vkey_map[][3] = { { VK_MEDIA_PLAY_PAUSE, NoSymbol, XF86XK_AudioPlay }, { VK_LAUNCH_MAIL, NoSymbol, XF86XK_Mail }, { VK_LAUNCH_APP2, NoSymbol, XF86XK_Calculator }, + // Japanese keyboard support + { VK_OEM_ATTN, XK_Eisu_toggle, NoSymbol }, + { VK_OEM_FINISH, XK_Katakana, NoSymbol }, + { VK_OEM_COPY, XK_Hiragana, NoSymbol }, + { VK_OEM_AUTO, XK_Zenkaku_Hankaku, NoSymbol }, + { VK_OEM_ENLW, XK_Zenkaku_Hankaku, NoSymbol }, + { VK_OEM_BACKTAB, XK_Romaji, NoSymbol }, }; int win32_vkey_to_keysym(UINT vkey, int extended) -- 2.39.5