You are not logged in.
I am trying to swap my Left Alt with the Left Windows key. It works fine using this .Xmodmap
remove Mod1 = Alt_L
remove Mod4 = Super_L
keysym Super_L = Alt_L
keysym Alt_L = Super_L
add Mod1 = Super_L
add Mod4 = Alt_L
clear Lock
add Control = Caps_Lock
then I added "xmodmap ~/.Xmodmap" to my .xinitrc. Using just xmodmap and xev I can confirm that the keys have indeed been swapped. The problem occurs when I launch Xmonad.
Here is my xmodmap before Xmonad
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x6d), Caps_Lock (0x42)
mod1 Super_L (0x40), Alt_R (0x71), Meta_L (0x9c), Super_L (0x7d)
mod2 Num_Lock (0x4d)
mod3
mod4 Alt_L (0x73), Super_R (0x74), Alt_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
and then directly after
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x73), Super_R (0x74), Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
No matter what commands I use, xmodmap always stays the same after XMonad has been launched. I'm not sure if there is something I'm missing but I can't seem to swap the keys. If anyone has experience with this, it would be much obliged.
Offline
I've had some similar problem, trying to switch the capslock button to escape with xmodmap in xmonad. The solution was to put
(sleep 1; xmodmap ~/.Xmodmap) &
in .xinitrc.
Offline
Thanks for the suggestion but that did not work..
Offline
Are you saying that it works if you run in when XMonad has already started ?
Then you can just increase the sleep time
(sleep 5 && xmodmap ~/.Xmodmap) &
Last edited by moljac024 (2009-07-23 07:21:16)
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Are you saying that it works if you run in when XMonad has already started ?
No, sorry that I didn't make that clearer but it does not work even if I run it while XMonad has been started.
But strangely, if I do this
xmodmap ~/.Xmodmap; xmodmap; sleep 3; xmodmap
The first plain "xmodmap" shows that the keys have all been switched according to my .Xmodmap config file. The second xmodmap, after waiting three seconds, shows that all of the keys have been changed back as if I hadn't even ran xmodmap.
Last edited by Angle (2009-07-23 14:02:01)
Offline