2

I'm never using the windows key but for whatever reason on my laptop keyboard I often hit them by mistake trying to hit ALT.

How can I configure xkb so that the left windows key acts as an additional alt key? (so, yes, I do want both the physical ALT key and the windows key next to it to both act as if they were ALT)

As a bonus, how can I configure the right windows key to act as an additional AltGr?

1 Answers1

1

There's already a definition for that in xkeyboard-config. You can add it to your keymap by setting the altwin:alt_win option.

Using setxkbmap:

setxkbmap -option altwin:alt_win [...]

Or in xorg.conf:

Section "InputClass"
        Identifier "keyboard-all"
        MatchIsKeyboard "on"
        Driver "evdev"
        Option "XkbOptions" "altwin:alt_win"
EndSection

Or you can modify the keymap manually using xmodmap:

keycode 133 = Alt_L
keycode 134 = Alt_R