key codes (was: Linux laptop configuration)
Jeremy C. Reed
plug-discuss@lists.plug.phoenix.az.us
Mon, 12 May 2003 09:28:44 -0700 (PDT)
On Sun, 11 May 2003, Lee Einer wrote:
> First, this laptop keyboard has five cutesy, illuminated programmable
> keys at the top, which are supposed to be shortcuts to internet access,
> e-mail, etc. Is there any way to get them recognized and programmed
> under Linux?
If using X...
Use xev(1) to get the keycode for each.
Then use xmodmap(1) to map the special keycodes into keysyms (used by X).
For example, to setup the left Windows key on my system, I use:
xmodmap -e "keycode 115 = F30"
(where F30 is an auxilliary function key.)
I use blackbox and bbkeys. And I use bbkeys to map this F30 to change my
workspace.
Another example, I use xev to find out my Windows menu key is keycode
117. To make it map to the letter "j" I do:
xmodmap -e "keycode 117 = J"
(On my system, the keysym names and defaults are defined in
/usr/X11R6/include/X11/keysymdef.h and /usr/X11R6/lib/X11/XKeysymDB.
Ignore the XK_ prefix.)
Jeremy C. Reed
http://bsd.reedmedia.net/