]> source.dussan.org Git - tigervnc.git/commitdiff
Windows JIS Keyboard Support
authorgsittyz <gsittyz@gmail.com>
Sat, 31 Oct 2020 17:09:04 +0000 (02:09 +0900)
committergsittyz <gsittyz@gmail.com>
Sat, 31 Oct 2020 17:09:04 +0000 (02:09 +0900)
Added vkey mappings for Japanese keyboards because the special keys for Japanese input do not work on TigerVNC currently.

vncviewer/win32.c

index 537ff43574990741356543a6f02335886c611287..4213d3f134018106af63c782c76dfacba047e439 100644 (file)
@@ -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)