0

I have an English US keyboard (it has an Alt on the right of the spacebar), I have set the English US Layout and if I use "Show Keyboard Layout" and press the right Alt the key on the right (labeled as Meta R, Alt R) gets highlighted. However, in Emacs it is not recognized as Meta, and in xev it shows as ISO_Level_3_Shift. The computer is dual booted with Windows, and the right Alt is properly recognized there.

The output of gsettings get org.gnome.desktop.input-sources xkb-options is @as []

  • Welcome to AskUbuntu, Perhaps this example is the same one. https://askubuntu.com/questions/813332/how-to-enable-alt-gr-key-as-alt-r-for-emacs-on-ubuntu-16-04 – Sadaharu Wakisaka Nov 30 '21 at 01:36
  • Hmm.. With no xkb-options it's hard to understand why Right Alt is turned into a 3:rd level key when you use the English (US) layout. Can it possibly be some Emacs setting? – Gunnar Hjalmarsson Nov 30 '21 at 17:41
  • Well, also some system shortcuts like Alt+F1 or Alt+F2 only work with the left Alt. I have also installed 21.10 on a laptop with an English keyboard and the right Alt works correctly... – Marco Villotta Nov 30 '21 at 21:54
  • What is the name of your keyboard, manufacturer etc. A very few keyboards have a weird circuit and/or wiring. I had an HP laptop with this weird US keyboard which can't type backslash, and only can do with the HP driver. – Sadaharu Wakisaka Dec 01 '21 at 02:06

1 Answers1

0

From Terminal

xmodmap -e "keycode 108 = Alt_R Meta_R Alt_R Meta_R"

  • I've tried, and now xmodmap -pke shows keycode 108 = Alt_R NoSymbol Alt_R NoSymbol Alt_R and the right Alt is still not working as right Alt. – Marco Villotta Nov 30 '21 at 21:57