[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mapping cmd to alt in X with linux keycodes



On Thu, 2001-10-11 at 09:16, Wilhelm *Rafial* Fitzpatrick wrote:
> How do you set this up?  By default alt == meta, so I'm currently 
> using emacs that way, but my fingers really want meta to be the 
> command key.  How can I tell emacs to use the command key instead?

If you have your modifier bits and key symbols setup correctly
(correctly being defined as what emacs expects...), it will just work.
Meta-x will show up as M-x, and Alt-x will show up as A-x (which does
nothing by default).

Below is my /etc/X11/Xmodmap.

The important thing is to get the Mod bits set up correctly. By default,
there is no Mod bit set up for meta, which means that even if you define
one, it won't work as expected.

Please note that the Capslock -> Control thing will only work if you use
a hacked kernel...

Also notice that I set up the PowerBook keys to send XF86 keycodes (I
then use sawfish to make provide funtionality for these... I have
functional volume keys! And the eject key works!) 

remove Lock    = Caps_Lock
remove Mod1    = Alt_R
remove Mod2    = Num_Lock
remove Mod4    = Meta_L

! Setup Alt and Meta correctly
keycode 0x40 = Alt_L
keycode 0x73 = Meta_L

! Add Caps lock Control key
keycode 0x42 =	Control_L

! Assign Hyper and Super to fn-Command and fn-Option respectively
keycode 0xDE =	Hyper_R
keycode 0x71 =	Super_R

! Make Enter the Multi Key
keycode 0x6C =	Multi_key

! Powerbook Special keys
keycode 0xA5 = XF86AudioLowerVolume
keycode 0x9E = XF86AudioRaiseVolume
keycode 0xA6 = XF86AudioMute
keycode 0x74 = XF86Eject


add    Control = Control_L
add    Mod1    = Alt_L
add    Mod2    = Hyper_R
add    Mod3    = Meta_L
add    Mod4    = Multi_key
add    Mod5    = Super_R Super_R




Reply to: