On 03 May 2002 22:31:49 -0400, Henry S. Greenside staggered into the
Black Sun and said:
Quote:> I have been using a Macintosh USB keyboard with my Linux RH 7/1 system
> since the keyboard has a nice touch. I would like to use xmodmap to
> remap the left control key to the left command/apple key (to use my
> thumb rather than pinky for control). Can someone tell me how to
> figure out the key code of the command/apple key?
The keys on those things are way too small, and give me something with
clicky-keys, preferably an IBM Indestructible that weighs 5 pounds... oh
In X, start an xterm/konsole/Eterm , and inside that terminal app,
execute "xev". After the initialization messages scroll by, try
pressing a few keys. You'll notice things like this appearing in the
KeyPress event, serial 27, synthetic NO, window 0x3600001,
root 0x37, subw 0x0, time 2575505226, (710,-367), root:(714,417),
state 0x0, keycode 117 (keysym 0xff67, Menu), same_screen YES,
XLookupString gives 0 characters: ""
Way too much information, but the "117" there is the keycode received.
This is from me pressing the Menu key on an MS Natural Pro. I can
map this key to another keysym like so:
xmodmap -e 'keycode 117 = Control_L'
if I wanted my Menu key to act like the left Ctrl key in all X
applications. Once you've found out the keycode, you can put that
xmodmap command line into ~/.Xmodmap , which will be sourced
automagically when X is started.
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com / "He is a rhythmic movement of the
-----------------------------/ penguins, is Tux." --MegaHAL