aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2015-11-21 21:18:55 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2015-11-21 21:18:55 +0000
commitdb00265949ba78cd4322cd33a16620f099beb443 (patch)
tree25b6c6e0ad6fac304fd4d31a748950e2e33a3a9e
parentd6c536336053f02f4dff8f6c4ff7c73baa97e45b (diff)
downloadsrc-db00265949ba78cd4322cd33a16620f099beb443.tar.gz
src-db00265949ba78cd4322cd33a16620f099beb443.zip
Add support for Kana and Eisu keys to the USB keyboard driver.
PR: 204709 Submitted by: naito.yuichiro@gmail.com MFC after: 3 days
Notes
Notes: svn path=/head/; revision=291146
-rw-r--r--sys/dev/usb/input/ukbd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index 0e56d9643a0f..3938952ee491 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -299,6 +299,10 @@ static const struct ukbd_mods ukbd_mods[UKBD_NMOD] = {
* 0x68: F13
* 0x69: F14
* 0x6a: F15
+ *
+ * USB Apple Keyboard JIS generates:
+ * 0x90: Kana
+ * 0x91: Eisu
*/
static const uint8_t ukbd_trtab[256] = {
0, 0, 0, 0, 30, 48, 46, 32, /* 00 - 07 */
@@ -319,7 +323,7 @@ static const uint8_t ukbd_trtab[256] = {
109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */
121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */
124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */
- NN, NN, NN, NN, NN, NN, NN, NN, /* 90 - 97 */
+ 129, 130, NN, NN, NN, NN, NN, NN, /* 90 - 97 */
NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */
NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */
NN, NN, NN, NN, NN, NN, NN, NN, /* A8 - AF */
@@ -2067,7 +2071,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up)
0x166, /* Sun Type 6 Find */
0x167, /* Sun Type 6 Cut */
0x125, /* Sun Type 6 Mute */
- /* 120 - 128 */
+ /* 120 - 130 */
0x11f, /* Sun Type 6 VolumeDown */
0x11e, /* Sun Type 6 VolumeUp */
0x120, /* Sun Type 6 PowerDown */
@@ -2079,6 +2083,8 @@ ukbd_key2scan(struct ukbd_softc *sc, int code, int shift, int up)
0x79, /* Keyboard Intl' 4 (Henkan) */
0x7b, /* Keyboard Intl' 5 (Muhenkan) */
0x5c, /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */
+ 0x71, /* Apple Keyboard JIS (Kana) */
+ 0x72, /* Apple Keyboard JIS (Eisu) */
};
if ((code >= 89) && (code < (int)(89 + (sizeof(scan) / sizeof(scan[0]))))) {