7

I have Ubuntu 18.04 installed with GNOME.

My left alt key opens application menu while right alt works as expected (left alt + F4 doesn't work for example, right alt + F4 works perfectly).

How can I fix the left alt behavior so that it works like right alt?

Zanna
  • 70,465
ingvar
  • 240
  • i'm not sure you really want the same behavior between left and right Alt; the right isn't called Alt Gr for nothing, it's because he has a behavior that the basic Alt hasn't; for example, if Alt Gr would have the same behavior as Alt, on an azerty keyboard, we couldn't type characters like '@', '{' or '#' (and i'm pretty sure it can't be possible to type some character too on a qwerty keyboard) and think about the character which can be displayed by typing the ASCII code – damadam Jun 15 '18 at 09:29
  • 1
    See also: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1508146 for a bug regarding Alt+Left and Alt+Right. The fix is: sudo kbd_mode -s – Dave Jarvis Aug 28 '18 at 18:37

1 Answers1

1

The terms we are discussing here are "keyboard shortcuts" and "keybindings". They are useful when searching for help.

First, run xev in a terminal to see if the key works.
If it works, open Settings > Devices > Keyboard for a list of shortcuts. If it says Alt without specifying right or left they should both work. Replace any that specify a side and make sure it only says Alt.

If you have trouble making the settings do that, install dconf-editor

sudo apt install dconf-editor

and launch it from the terminal

dconf-editor 

Locate the search icon and type keybinding and look through the paths for what you need. In your example navigate to

org/gnome/desktop/vm/keybindings/close 

If the default value is on it should be set to

['<Alt>F4']  

If it's not, switch default to off and enter exactly the above as a custom entry.

My Alt shortcuts seem to be the same for each side, so maybe yours got reconfigured somehow.

Zanna
  • 70,465
jordy
  • 1,670
  • Close combination is set to['<Alt>F4'], but on alt press window losts focus. If restore focus (click in window) F4 works and closes window. – ingvar Jun 15 '18 at 16:42
  • 1
    What happens when you quickly tap left Alt and nothing else? What happens when you hold it down for a couple seconds? (Make sure some windows are open) – jordy Jun 16 '18 at 00:59
  • 2
    Also, install Gnome Tweak tool. Under Keyboard & Mouse -> Overview Shortcut -> Additional Layout Options. Explore that and see if left Alt is set to anything. It's possible that a "hide window on focus loss" setting is enabled, possibly because the Alt_L is activating the top bar. – jordy Jun 16 '18 at 01:22
  • Quick tap on left alt opens application menu. On holding alt active window losts focus. And I don't have any combinations with Alt – ingvar Jun 16 '18 at 11:20