NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xsrc/48347: Cannot input Japanese special keys of JP106 keyboard with NetBSD/evbarm(RPI) or some arch.



>Number:         48347
>Category:       xsrc
>Synopsis:       Cannot input Japanese special keys of JP106 keyboard with 
>NetBSD/evbarm(RPI) or some arch.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 27 18:10:00 +0000 2013
>Originator:     Yasushi Oshima
>Release:        NetBSD 6.1_STABLE
>Organization:
>Environment:
NetBSD rpi 6.1_STABLE NetBSD 6.1_STABLE (RPI) #0: Tue Jul 30 08:48:25 JST 2013  
oshima@sweety:/export/netbsd-6/obj/evbarm/sys/arch/evbarm/compile/RPI evbarm
>Description:
When using X environment with USB JP106 keyboard, 
some special keys of JP106 are not able to input.
These keys always return keycode 8, this code is unused on Xserver.
Because these keys return the same code, cannot map a unique keysym with 
xmodmap.

This occurs on NetBSD/dreamcast, this JP-kbd has the same keycode with USB kbd.
>How-To-Repeat:
Connect JP106 Key to RPI and startx,
Change keyboard map to jp:
 setxkbmap -layout jp -keymap jp106
Input JP106 special key:
 '\|' (Left of Back Space on JP106)
 '\_' (Left of Right-Shift on JP106)
 Muhenkan (Left of SPACE BAR on JP106)
 Henkan (Right of SPACE BAR on JP106)
 KATAKANA-HIRAGANA (Right of Henkan on JP106, or Left of MENU/WIN)

Watch keycode with xev(1).


>Fix:
Patch for bsd_KbdMap.c for NetBSD/current.
See also usbmap[] of external/mit/xf86-input-keyboard/dist/src/sun_kbdMap.c. 
This patch is made into the same as sun_kbdMap.c.

--- external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c        16 Jul 2012 
12:49:42 -0000      1.8
+++ external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c        27 Oct 2013 
17:14:23 -0000
@@ -346,17 +346,32 @@
        /* 132 */ KEY_NOTUSED,
        /* 133 */ KEY_NOTUSED,
        /* 134 */ KEY_NOTUSED,
-       /* 135 */ KEY_NOTUSED,
-       /* 136 */ KEY_NOTUSED,
-       /* 137 */ KEY_NOTUSED,
-       /* 138 */ KEY_NOTUSED,
-       /* 139 */ KEY_NOTUSED,
-       /* 140 */ KEY_NOTUSED,
-       /* 141 */ KEY_NOTUSED,
-       /* 142 */ KEY_NOTUSED,
-       /* 143 */ KEY_NOTUSED,
-       /* 144 */ KEY_NOTUSED,
-       /* 145 */ KEY_NOTUSED,
+/*
+ * Special keycode for For Japanese keyboard
+ * Override atKeyname HKTG and BSlash2 code to unique for JP106 keybaord
+ */
+#undef KEY_HKTG
+#define KEY_HKTG       200 /* Japanee Hiragana Katakana Toggle */
+#undef KEY_BSlash2
+#define KEY_BSlash2    203 /* Japanese '\_' key */
+
+        /* 135 */ KEY_BSlash2, /* Japanese 106 kbd: '\_' */
+        /* 136 */ KEY_HKTG,    /* Japanese 106 kbd: Hiragana Katakana toggle */
+        /* 139 */ KEY_XFER,    /* Japanese 106 kbd: Henkan */
+        /* 139 */ KEY_NFER,    /* Japanese 106 kbd: Muhenkan */
+        /* 140 */ KEY_NOTUSED,
+        /* 141 */ KEY_NOTUSED,
+        /* 142 */ KEY_NOTUSED,
+        /* 143 */ KEY_NOTUSED,
+/*
+ * Special keycode for For Korean keyboard
+ * Define Hangul and Hangul_Hanja unique key code
+ * These keys also use KANA and EISU on some Macintosh Japanese USB Keyboards
+ */
+#define KEY_Hangul             201     /* Also KANA Key on Mac JP USB kbd */
+#define KEY_Hangul_Hanja       202     /* Also EISU Key on Mac JP USB kbd */
+        /* 144 */ KEY_Hangul,          /* Korean 106 kbd: Hangul */
+        /* 145 */ KEY_Hangul_Hanja,    /* Korean 106 kbd: Hangul Hanja */
        /* 146 */ KEY_NOTUSED,
        /* 147 */ KEY_NOTUSED,
        /* 148 */ KEY_NOTUSED,

Ref: USB HID Usage Tables:
  http://www.usb.org/developers/devclass_docs/Hut1_11.pdf Page 60

When netbsd-6 branch, require the change rev1.7:
http://cvsweb.netbsd.org/bsdweb.cgi/xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c.diff?r1=1.6&r2=1.7&f=h



Home | Main Index | Thread Index | Old Index