Problems with ABNT2 USB keyboards

From: Piter PUNK
Date: Sat Aug 13 2005 - 20:25:31 EST


Hi,

I got problems trying to use ABNT2 USB keyboards with the
"." key in numeric keypad. The problem only appears in USB
keyboards (not in PS/2) and in 2.4 series (not in 2.6).

The solution is very simple, and only need to change one line
and add other in pc_keyb.c. And, in my tests, don't affect any other
keyboards.

Thanks a lot,

Piter PUNK --- linux/drivers/char/pc_keyb.c 2005-07-26 21:16:40.000000000 -0300
+++ linux-my/drivers/char/pc_keyb.c 2005-07-26 21:16:33.000000000 -0300
@@ -231,6 +231,12 @@
#define E0_MSLW 125
#define E0_MSRW 126
#define E0_MSTM 127
+/* piterpk@xxxxxxxxxxxx:
+ * Brazilian ABNT2 had 18 keys in numeric keypad
+ * instead 17 in other keyboards. The 18th key is
+ * a "."
+ */
+#define E0_KPPT 121

static unsigned char e0_keys[128] = {
0, 0, 0, 0, 0, 0, 0, 0, /* 0x00-0x07 */
@@ -247,7 +253,7 @@
0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, 0, 0, /* 0x58-0x5f */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */
0, 0, 0, 0, 0, 0, 0, E0_MACRO, /* 0x68-0x6f */
- 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */
+ 0, 0, 0, 0, 0, E0_KPPT, 0, 0, /* 0x70-0x77 */
0, 0, 0, 0, 0, 0, 0, 0 /* 0x78-0x7f */
};