From 95c8163a16f784637ad6843086b34589f79bfdc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 23 Nov 2015 20:01:25 +0100 Subject: [PATCH] Add Hangul and Hangul_Hanja keycodes for korean keyboards. * map both keys on USB keyboards. Untested. --- headers/os/interface/InterfaceDefs.h | 6 ++++-- .../drivers/input/usb_hid/KeyboardProtocolHandler.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/headers/os/interface/InterfaceDefs.h b/headers/os/interface/InterfaceDefs.h index 46f3a83a6f..edfe7fdd23 100644 --- a/headers/os/interface/InterfaceDefs.h +++ b/headers/os/interface/InterfaceDefs.h @@ -63,9 +63,11 @@ enum { B_FUNCTION_KEY = 0x10, - // for Japanese keyboards + // for Japanese and Korean keyboards B_KATAKANA_HIRAGANA = 0xf2, - B_HANKAKU_ZENKAKU = 0xf3 + B_HANKAKU_ZENKAKU = 0xf3, + B_HANGUL = 0xf0, + B_HANGUL_HANJA = 0xf1 }; enum { diff --git a/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp b/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp index 9824a6f7d2..c19d7f4d13 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/KeyboardProtocolHandler.cpp @@ -671,6 +671,12 @@ KeyboardProtocolHandler::_ReadReport(bigtime_t timeout, uint32 *cookie) 0x6a, // Yen (macron key, japanese) 0x6d, // Henkan, first key right to spacebar, japanese 0x6c, // Muhenkan, key left to spacebar, japanese + 0x00, // Keyboard International6 unmapped + 0x00, // Keyboard International7 unmapped + 0x00, // Keyboard International8 unmapped + 0x00, // Keyboard International9 unmapped + 0xf0, // Hangul, korean, Kana, Mac japanese USB + 0xf1, // Hangul_Hanja, korean, Eisu, Mac japanese USB }; static const size_t kKeyTableSize