ref: 59d978eeb6d9f987d2c2b17d2799f3c15655284f
parent: e1949eedf6893c76472360189b6539bc0d573378
author: Jacob Moody <moody@posixcafe.org>
date: Thu Oct 6 22:09:36 EDT 2022
nusb/kb: support 無変換, 変換, and 'ひらがな / カタカナ' keys These usb codes are defined for Japanese OADG 109(A) layouts. The scancodes are already defined in /sys/lib/kbmap/jp, they map to ^l, ^\, and ^n (^v with shift). These perform actions true to form in ktrans already: clearing the line buffer, completing to kanji, and switching between hiragana and katakana. http://hp.vector.co.jp/authors/VA003720/lpproj/others/kbdjpn.htm tested with 109A layout tex shinobi
--- a/sys/src/cmd/nusb/kb/kb.c
+++ b/sys/src/cmd/nusb/kb/kb.c
@@ -125,7 +125,7 @@
[0x70] 0xf8, 0xf9, 0xfa, 0xfb, 0x0, 0x0, 0x0, 0x0,
[0x78] 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf1,
[0x80] 0xf3, 0xf2, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0,
-[0x88] 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+[0x88] 0x70, 0x0, 0x79, 0x7b, 0x0, 0x0, 0x0, 0x0,
[0x90] 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
[0x98] 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
[0xa0] 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,