How do I remap Alt to a Super Key?
I've got a laptop that doesn't include a super / windows key. I find this very frustrating. When I had windows on this computer I had mapped one of my alt keys to act like the windows key. I'd like to accomplish the same thing on linux how can I do this?
I tried to make ~/.Xmodmap with the following: Code:
keycode 108 = Super_R NoSymbol Super_R NoSymbol Super_R Code:
xmodmap ~/.Xmodmap Code:
KeyPress event, serial 35, synthetic NO, window 0x2200001, Clearly I don't know what I'm doing. Can someone please help me? |
Just a guess (I am also confused by keyboard layouts) but maybe you need to reset Alt_R as a modifier. Run xmodmap -pm to see your current modifiers. I get:
mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c) mod4 Super_L (0x7f), Hyper_L (0x80) (among other stuff). So maybe something like remove mod1 = Alt_R add mod4 = Alt_R would have the required effect. |
Code:
keycode 108 = Super_R One problem: this doesn't survive a reboot. The key mapping part sticks and the remove but not the add. Here's what I get after reboot: Code:
$ xmodmap -pk | grep 108 Code:
xmodmap ~/.Xmodmap Code:
xmodmap -e 'remove mod1 = Super_R' |
I've also had the experience of trying to set X resources and having them mysteriously clobbered. I never figured out in any detail what was happening. But as far as I can see on my Debian system the desktop config file ~/.gnomerc gets the last bite on startup so I would give that (or your equivalent) a go for running xmodmap.
|
@ marronbaboon Thanks for that suggestion.
Just out of curiosity I tried changing .Xmodmap to: Code:
keycode 108 = Super_R Code:
xmodmap ~/.Xmodmap Many hours later this is a total black box. |
All times are GMT -5. The time now is 01:36 AM. |