Messages in this thread | | | Date | Sun, 26 Jan 2003 00:29:15 +0900 | From | Osamu Tomita <> | Subject | Re: [PATCH 2.5.59] support japanese JP106 keyboard on new console. |
| |
Vojtech Pavlik wrote: > > On Sat, Jan 25, 2003 at 02:03:56AM +0900, Osamu Tomita wrote: > > Please fix atkbd_set2_keycode table in atkbd.c for jp106 keyboard. > > > > Vojtech Pavlik wrote: > > > > > > On Fri, Jan 24, 2003 at 12:14:53PM +0900, Hiroshi Miura wrote: > > > > > > > After re-writting a console layer, a japanese keyboard is not supported (or degraded). > > > > This patch fixs it. > > > > > > This patch doesn't work, all normal keyboards - not just japanese ones have id of 0xab02. > > I agree this point. It's difficult to detect jp106 keyboard automatically. > > Many venders use common internal circuits with us keyborad. > > > > > > A USB keyboard driver may have same problem, but I don't have one. > > > > > > > > --- linux-2.5.59/drivers/input/keyboard/atkbd.c 2002-12-03 07:59:41.000000000 +0900 > > > > +++ edited/linux-2.5.59/drivers/input/keyboard/atkbd.c 2003-01-24 09:13:11.000000000 +0900 > > > > @@ -309,6 +309,12 @@ > > > > if (atkbd_command(atkbd, &atkbd->oldset, ATKBD_CMD_GSCANSET)) > > > > atkbd->oldset = 2; > > > > > > > > + if (atkbd->id == 0xab02) { > > > > + printk("atkbd: jp109(106) keyboard found\n"); > > > > + param[0] = atkbd_set; > > > > + atkbd_command(atkbd, param, ATKBD_CMD_SSCANSET); > > > > + return 5; > > > > + } > > > > /* > > > > * For known special keyboards we can go ahead and set the correct set. > > > > * We check for NCD PS/2 Sun, NorthGate OmniKey 101 and > > > > @@ -531,6 +537,12 @@ > > > > else > > > > memcpy(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode)); > > > > > > > > + if (atkbd->set == 5) { > > > > + atkbd->keycode[0x13] = 0x70; /* Hiragana/Katakana */ > > > > + atkbd->keycode[0x6a] = 0x7c; /* Yen, pipe 124*/ > > I think he catches good point. Kernel 2.0-2.4 use keycode 124 (0x7c) for scancode 0x6a. > > 2.5 uses keycode 183. This breaks jp106 keymaps. We cannot type '\' and '|' from jp106 > > keyboard on 2.5 kernel. > > I believe there is no impact by changing keycode 183 to 124. > > Well, it's not so easy. Fortunately KEY_KPCOMMA can be relatively easily > moved elsewhere, however keys 181 to 198 are 'international and language > keys', defined the same way as USB/HID spec (please take a look at it). > Having a single one of them remapped elsewhere doesn't look so nice. > > -- > Vojtech Pavlik > SuSE Labs Thanks. I see. Keycode in the kernel should be unified. I'll use newer kbd utility (kbd-1.08) and rewrite keymap like below. keycode 124 = backslash bar #Compatibility for 2.4 (for a while) keycode 183 = backslash bar
BTW. I've extracted japanese keyboard specification from OADG's documents. About OADG, please visit http://www.oadg.org/. I attach those files. Usefull?
-Regards, Osamu Tomita[unhandled content-type:application/octet-stream] | |