Skip to contentSkip to conversation

Problems with ABNT2 USB keyboards

PATCH Piter PUNK 1 participant 1 message Aug 14, 2005 Char and misc drivers

lore
Share & tools
lore

Piter PUNK

author
#0 lore raw

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

drivers/char/pc_keyb.c +7 -1
@@ -231,6 +231,12 @@
 #define E0_MSLW	125
 #define E0_MSRW	126
 #define E0_MSTM	127
+/* [email protected]:
+ * 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 */
 };