summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsamu Sayama <osamu.sayama@oracle.com>2010-08-11 19:00:23 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-08-11 19:55:49 -0700
commit425c1280439fe37497a33c47b5a8432e59cbfb76 (patch)
treec3d352e0bbdb900fe60cbf4d961e88607eb13bde
parentf8e219828db920c4cd7a2645a6194de029dc9bb5 (diff)
sun_kbd: Add mappings for Hangul and Hanja keys on Korean keyboard
Fixes Sun bug 6897086: Hangul and Hanja keys on Korean PC 105 keyboard are not recognized http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6897086 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/sun_kbdMap.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/sun_kbdMap.c b/src/sun_kbdMap.c
index d739e1c..174aed9 100644
--- a/src/sun_kbdMap.c
+++ b/src/sun_kbdMap.c
@@ -41,6 +41,17 @@
#define KEY_Kanji 0x82
#define KEY_Execute 0x83
+/*
+ * Additional Korean 106 Keyboard Keys not defined in atKeynames.h
+ * These are exactly same USB usage id with Kana(0x90) and Eisu(0x91) keys
+ * in Mac Japanese keyboard. From /usr/X11/lib/X11/xkb/keycodes/xfree86, these
+ * are 209 and 210. So these should be 0xc9(209-8=201) and 0xca(210-8=202).
+ * <EISU> = 210; // Alphanumeric mode on macintosh
+ * <KANA> = 209; // Kana mode on macintosh
+ */
+#define KEY_Hangul 0xC9 /* Also Kana in Mac Japanaese kbd */
+#define KEY_Hangul_Hanja 0xCA /* Also Eisu in Mac Japanaese kbd */
+
/* Override atKeynames.h values with unique keycodes, so we can distinguish
KEY_F15 from KEY_HKTG & KEY_KP_DEC from KEY_BSlash2 */
#undef KEY_HKTG
@@ -476,8 +487,8 @@ static unsigned char usbmap[256] = {
/* 141 */ KEY_NOTUSED,
/* 142 */ KEY_NOTUSED,
/* 143 */ KEY_NOTUSED,
- /* 144 */ KEY_NOTUSED,
- /* 145 */ KEY_NOTUSED,
+ /* 144 */ KEY_Hangul, /* Korean 106 Kbd: Hangul */
+ /* 145 */ KEY_Hangul_Hanja, /* Korean 106 Kbd: Hanja */
/* 146 */ KEY_NOTUSED,
/* 147 */ KEY_NOTUSED,
/* 148 */ KEY_NOTUSED,