Hi James!

'xmodmap -pme' will list the modifier keys and the associated keysym
names. With 'xev' you can get more info about each key as you press
it, like keycode, keysym etc. Alt is Mod1, you have to check there how
the Command key is called.

So, here xmodmap tells me:

$ xmodmap -pme
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock
control     Control_L (0x40),  Control_R (0x5c),  Control_R (0x6c),
Control_L (0xcc)
mod1        Alt_L (0x25),  Alt_L (0x42),  Meta_L (0x69),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        Mode_switch (0xcb)

Lets say I want to swap the alt and control keys, but, on my keyboard,
I have no Meta_L. So, I'll use alt gr (ISO_Level3_Shift) instead. I
put this into my ~/.Xmodmap file:

remove control = Control_L Control_R
remove mod1 = Alt_L Meta_L
remove mod5 = ISO_Level3_Shift
keysym Control_L = Alt_L
keysym Control_R = Meta_L
keysym Alt_L = Control_L
keysym ISO_Level3_Shift = Control_R
add mod1 = Alt_L Meta_L
add control = Control_L Control_R

That's it, running xmodmap ~/.Xmodmap should change your layout. Note
that .Xmodmap (at least here on debian Squeeze) get's read on startup,
if you want to switch to the old layout back, simply rename this file
and restart X.

Hope that helps,

Ricardo

---
[email protected]
http://identi.ca/group/puredyne
irc://irc.goto10.org/puredyne

Reply via email to