TL; DR
How do I re-map ALT R to work as ALT R instead of ALT Gr on Ubuntu 20.04?
Details
As described in another post, I've executed xev
at Ubuntu 20.04 in order to discover ALT L and ALT R keycodes:
- ALT L
keycode 64 (keysym 0xffe9, Alt_L)
- ALT R
keycode 108 (keysym 0xfe03, ISO_Level3_Shift)
Running xmodmap -pke > ~/.Xmodmap
, the following configuration was saved:
keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
while gsettings
provides:
$ gsettings get org.gnome.desktop.input-sources xkb-options
['lv3:menu_switch']
Theoretically re-mapping 108
at ~/.Xmodmap
should be enough:
keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R
However, even running xmodmap ~/.Xmodmap
and also saving this command at ~/.xinitrc
, the modifications did not take effect immediately or after login again at Ubuntu.
Thus it is not possible to execute extensible commands in Emacs using ALT R + X at Emacs
So what is the proper way of changing ALT R behavior?
.Xmodmap
took effect as expected. – JP Ventura Apr 13 '20 at 18:02~/.Xmodmap
? – Gunnar Hjalmarsson Apr 13 '20 at 18:38gsettings get org.gnome.desktop.input-sources xkb-options
– Gunnar Hjalmarsson Apr 14 '20 at 17:19