Messages in this thread | | | Date | Tue, 22 Dec 1998 18:42:21 -0600 (CST) | From | Matthew <> | Subject | New Hardware Hack for HP 2501 A |
| |
Kernel Gurus,
I recently bought a computer that had an HP SK-2501-A keyboard (picture at http://www.mattshouse.com/images/2501.jpg). This keyboard has 13 additional keys built into the case. They are labeled according to their mappings under NT 4. I hacked drivers/char/keyboard.c and added/modified the following code in order to enable these keys. A co-worker suggested that I post my changes here for possible inclusion in the kernel releases.
I'm not normally a member of this list so if I'm violating protocol, I'm sorry.
So, what's the procedure for getting this into the kernel, if such an honor is forthcoming?
/* Original Code */
#define E0_KPENTER 96 #define E0_RCTRL 97 #define E0_KPSLASH 98 #define E0_PRSCR 99 #define E0_RALT 100 #define E0_BREAK 101 /* (control-pause) */ #define E0_HOME 102 #define E0_UP 103 #define E0_PGUP 104 #define E0_LEFT 105 #define E0_RIGHT 106 #define E0_END 107 #define E0_DOWN 108 #define E0_PGDN 109 #define E0_INS 110 #define E0_DEL 111
/* End Original Code */
/* Starting immediately after, this code is added: */
/* Matthew Chappee changes for HP SK-2501 A Keyboard */ /* Contact matthew@mattshouse.com for information */ #define E0_USR1 112 /* 1 */ #define E0_USR2 113 /* TopTools */ #define E0_USR3 114 /* www */ #define E0_USR4 115 /* ? */ #define E0_USR5 116 /* 5 */ #define E0_USR6 117 /* 4 */ #define E0_USR7 118 /* 3 */ #define E0_USR8 119 /* 2 */ #define E0_USR9 120 /* lock */ #define E0_USR10 121 /* i */ #define E0_USR11 122 /* speaker off */ #define E0_USR12 123 /* volume up */ #define E0_USR13 124 /* volume down */ /* End HP SK-2501 A Keyboard Hack */
/* And this is the new e0_keys[] map: The modified entries start with E0_USR */
static unsigned char e0_keys[128] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00-0x07 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08-0x0f */ 0, 0, E0_USR2, 0, 0, 0, 0, E0_USR4, /* 0x10-0x17 */ 0, 0, 0, 0, E0_KPENTER, E0_RCTRL, E0_USR1, 0, /* 0x18-0x1f */ E0_USR11, E0_USR5, E0_USR7, E0_USR8, E0_USR6, E0_USR13, E0_USR12, 0, /* 0x20-0x27*/ 0, 0, 0, 0, 0, 0, E0_USR9, 0, /* 0x28-0x2f */ E0_USR10, 0, E0_USR3, 0, 0, E0_KPSLASH, 0, E0_PRSCR, /* 0x30-0x37 */ E0_RALT, 0, 0, 0, 0, E0_F13, E0_F14, E0_HELP, /* 0x38-0x3f */ E0_DO, E0_F17, 0, 0, 0, 0, E0_BREAK, E0_HOME, /* 0x40-0x47 */ E0_UP, E0_PGUP, 0, E0_LEFT, E0_OK, E0_RIGHT, E0_KPMINPLUS, E0_END,/* 0x48-0x4f */ E0_DOWN, E0_PGDN, E0_INS, E0_DEL, 0, 0, 0, 0, /* 0x50-0x57 */ 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, 0, 0, 0 /* 0x78-0x7f */ };
/* That's it, all of the extra keys work now */
---------------------------------- To segfault is human. To bluescreen is moronic.
Matthew Chappee E-Mail: Matthew <matthew@mattshouse.com> Date: 22-Dec-98 Time: 18:38:18
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |