Date: Tue, 18 Apr 1995 15:13:12 +0600 From: "William F. Macris" Subject: Kinesis keymapping on Sun workstations Here's a script that I wrote to remap the keycodes on the Kinesis. As it comes from the manufacturer, certain keys don't correspond to the X keycodes from a Sun type 4 keyboard. According to Kinesis Tech Support, one has to remap the embedded keypad keys to the "normal" keypad to get the cursor keys to work. I found that the following keys had either no or undesirable effect: Home, End, Page Up, Page Down, arrow key up/down/left/right, Insert I deciphered the keycode that _was_ being sent and then reassigned the correct actions to the unrecognized keycode. This way I avoided doing the remapping on the Kinesis itself. In the process, I also decided to give myself the useful functionality of the left-hand (L-keys) which are missing on the Kinesis: F1 is undo F2 is Cut F3 is Copy F4 is Paste F5 is Front F6 is Open Of course, this overrides the "normal" keypresses for F1..F6 but I never used them anyway. The only local changes that I've made on the keyboard are: Swap the ESC and CAPS LOCK (since I use escape a lot in vi) Override the left CTRL onto the right CTRL. The default action is to give an ALT on that key which I never use. I'd rather have both CTRLs available for vi/emacs key sequences. This is a csh script but if you use another shell then I think you can just change the first line to the full pathname of your shell. You could also put these in your login script but they do take a while to run so I prefer to execute them once the system is up... Enjoy! willie ------------------------- #/bin/csh # remap the undetected keys of the kinesis to the correct keysyms xmodmap -e "keycode 12 = F14 F14 Undo" xmodmap -e "keycode 13 = F20 F20 SunCut" xmodmap -e "keycode 15 = F16 F16 SunCopy" xmodmap -e "keycode 17 = F18 F18 SunPaste" xmodmap -e "keycode 19 = F15 F15 SunFront" xmodmap -e "keycode 21 = F17 F17 SunOpen" xmodmap -e "keycode 27 = Up F28 KP_8" xmodmap -e "keycode 31 = Left F30 KP_4" xmodmap -e "keycode 130 = F35 F35 KP_3 Next" xmodmap -e "keycode 34 = Down F34 KP_2" xmodmap -e "keycode 35 = Right F32 KP_6" xmodmap -e "keycode 59 = F27 F27 KP_7 Home" xmodmap -e "keycode 81 = F33 F33 KP_1 End" xmodmap -e "keycode 51 = Insert Insert KP_0" xmodmap -e "keycode 103 = F29 F29 KP_9 Prior"