Skip to contentSkip to conversation

ui/cocoa: Support unique keys of JIS keyboards

PATCH In review Akihiko Odaki 2 participants 2 messages Feb 12, 2021 – Feb 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui/cocoa: Support unique keys of JIS keyboards

---
 ui/cocoa.m | 7 +++++++
 1 file changed, 7 insertions(+)
ui/cocoa.m +7 -0
index 13fba8103e1..78fcfeaf04b 100644
@@ -240,6 +240,13 @@ static bool bool_with_iothread_lock(BoolCodeBlock block)
     [kVK_F14] = Q_KEY_CODE_SCROLL_LOCK,
     [kVK_F15] = Q_KEY_CODE_PAUSE,
 
+    // JIS keyboards only
+    [kVK_JIS_Yen] = Q_KEY_CODE_YEN,
+    [kVK_JIS_Underscore] = Q_KEY_CODE_RO,
+    [kVK_JIS_KeypadComma] = Q_KEY_CODE_KP_COMMA,
+    [kVK_JIS_Eisu] = Q_KEY_CODE_MUHENKAN,
+    [kVK_JIS_Kana] = Q_KEY_CODE_HENKAN,
+
     /*
      * The eject and volume keys can't be used here because they are handled at
      * a lower level than what an Application can see.
Signature · 1 line
2.24.3 (Apple Git-128)
#1 lore raw

ui/cocoa.m static bool bool_with_iothread_lock(BoolCodeBlock block) · line 248

Quoted 6 lines
ui/cocoa.m +6 -0
+    // JIS keyboards only
+    [kVK_JIS_Yen] = Q_KEY_CODE_YEN,
+    [kVK_JIS_Underscore] = Q_KEY_CODE_RO,
+    [kVK_JIS_KeypadComma] = Q_KEY_CODE_KP_COMMA,
+    [kVK_JIS_Eisu] = Q_KEY_CODE_MUHENKAN,
+    [kVK_JIS_Kana] = Q_KEY_CODE_HENKAN,

Added to UI patch queue.

thanks,
Gerd