Messages in this thread | | | Date | Wed, 12 Jul 2000 10:44:24 +0200 (MET DST) | From | Dennis Bjorklund <> | Subject | IBM Rapid Access Keyboard |
| |
I would be very happy for some help here from an experienced kernel hacker.
I have a Rapid Access keyboard with some (14) extra buttons and two more leds then a normal pc keyboard. To activate the extra buttons one have to send the sequence ec ea 71 ec ea 71 to the keyboard. Once that is done the extra keys generate normal e0xx sequences.
So I added this to pc_keyb.c: pckbd_init_hw() just before the CONFIG_PSMOUSE.
printk("ra: Init Rapid Access keyboard\n"); kbd_write_output_w(0xec); kbd_write_output_w(0xea); kbd_write_output_w(0x71); kbd_write_output_w(0xec); kbd_write_output_w(0xea); kbd_write_output_w(0x71);
One should probably make a loadable module instead, where this sequence is sent when the module is loaded, and the turn off sequence when the module is unloaded, or we could have an extra kernel argument. We might even want to always send this sequence if it does not do any harm to other keyboards.
But thats only one problem. I don't know what to do with the extra e0xx sequences. Should I put in a translation in the e0_keys[] table? All the extra keys are now mapped to 0 (unused), so it would be easy. But then there is a question about keycodes since they can only be max 127.
Next problem. We have two extra leds that should be changable from userland. For example the mute button have a small led that is normaly lit when one presses a button. How should I make these controlable. Intermix it with the other leds? Make a /proc entry where you can read and set there status? Maybe even use the /proc entry to activate and deactivate the rapid access keyboard? It fits nice with the idea to make a rapid_access.o module which creates the /proc entry.
But I thnink this is a bad way to go. There are a lot of kayboard out there today with extra buttons and extra leds. Maybe we should have some unified way to use all these. Any suggestions are welcome.
I also have trouble with setkeycodes. I thought that I could use it to map the e0xx sequences to something good and usable. But nothing seems to happen. What do I do wrong??
[root@merlin /root]$ getkeycodes Plain scancodes xx (hex) versus keycodes (dec) 0 is an error; for 1-88 (0x01-0x58) scancode equals keycode
0x58: 88 124 125 126 127 0 0 0 0x60: 0 0 0 0 0 0 0 0 0x68: 0 0 0 0 0 122 0 123 0x70: 0 0 0 89 120 0 0 90 0x78: 91 92 93 94 95 124 121 0
Escaped scancodes e0 xx (hex)
e0 00: 0 0 0 0 0 0 0 0 e0 08: 0 0 0 0 0 0 0 0 e0 10: 0 0 0 0 0 0 0 0 e0 18: 0 0 0 0 96 97 0 0 e0 20: 0 0 0 0 0 0 0 0 e0 28: 0 0 0 0 0 0 0 0 e0 30: 0 0 0 0 0 98 0 99 e0 38: 100 0 0 0 0 113 114 115 e0 40: 116 117 0 0 0 0 101 102 e0 48: 103 104 0 105 124 106 118 107 e0 50: 108 109 110 111 0 0 0 0 e0 58: 0 0 0 125 126 127 0 0 e0 60: 0 0 0 0 0 0 0 0 e0 68: 0 0 0 0 0 0 0 112 e0 70: 0 0 0 0 0 0 0 0 e0 78: 0 0 0 0 0 0 0 0 [root@merlin /root]$ setkeycodes e020 112 [root@merlin /root]$ getkeycodes Plain scancodes xx (hex) versus keycodes (dec) 0 is an error; for 1-88 (0x01-0x58) scancode equals keycode
0x58: 88 124 125 126 127 0 0 0 0x60: 0 0 0 0 0 0 0 0 0x68: 0 0 0 0 0 122 0 123 0x70: 0 0 0 89 120 0 0 90 0x78: 91 92 93 94 95 124 121 0
Escaped scancodes e0 xx (hex)
e0 00: 0 0 0 0 0 0 0 0 e0 08: 0 0 0 0 0 0 0 0 e0 10: 0 0 0 0 0 0 0 0 e0 18: 0 0 0 0 96 97 0 0 e0 20: 0 0 0 0 0 0 0 0 e0 28: 0 0 0 0 0 0 0 0 e0 30: 0 0 0 0 0 98 0 99 e0 38: 100 0 0 0 0 113 114 115 e0 40: 116 117 0 0 0 0 101 102 e0 48: 103 104 0 105 124 106 118 107 e0 50: 108 109 110 111 0 0 0 0 e0 58: 0 0 0 125 126 127 0 0 e0 60: 0 0 0 0 0 0 0 0 e0 68: 0 0 0 0 0 0 0 112 e0 70: 0 0 0 0 0 0 0 0 e0 78: 0 0 0 0 0 0 0 0
/Dennis
- 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/
| |