28

I am trying to disable Alt from triggering the global menu when I am using an application (I am using Ubuntu 14.04).

My problem is, when I am using emacs, for example, and I hit Alt+h, the help menu is being launched, which I don't want.

Zanna
  • 70,465
fusilli.jerry89
  • 383
  • 1
  • 3
  • 4

3 Answers3

17

You can go into Settings > Keyboard and change the shortcut or disable the shortcut there

enter image description here

Mendhak
  • 4,440
  • 1
    I already have 'Key to show the HUD' set as disabled. Are you sure this is an issue with HUD? – fusilli.jerry89 Apr 25 '14 at 22:45
  • @fusilli.jerry89 Mine showed disabled as well. I set it to something I never planned on using (Fn+? ... or something like that). Afterwards, Alt stopped triggering the menu. – Chester Jan 31 '16 at 17:47
11

I also use Emacs, but with the GUI (emacs & in a terminal shell) I don't see this problem - Alt-H selects the whole buffer.

When I run Emacs specifically inside a terminal (emacs -nw) I see the problem as you report. The Alt key is intercepted by the terminal application.

If you really want to use text-mode Emacs inside a terminal, you should use the terminal's menu (click inside the terminal window, then go to top of screen), then select Edit > Keyboard Shortcuts..., and uncheck "Enable menu access keys". After doing that, text-mode Emacs treats Alt-H just like GUI Emacs.

(edit) to disable the Alt key in all applications, run ccsm (CompizConfig Settings Manager), select Desktop -> Ubuntu Unity Plugin and disable the "Key to show the menu bar while pressed" and possibly "Key to show the HUD when tapped" too.

You may need to install ccsm using sudo apt-get install CompizConfig-Settings-Manager.

  • I now see Emacs GUI is a special case, which probably intercepts Alt. I edited the answer to provide a more general solution. – laugh salutes Monica C Apr 25 '14 at 23:08
  • Thank you laugh for your help. Sadly, this does prevent the menu bar from displaying, but if I still type a shortcut, for example alt + h, it will still trigger the menu. – fusilli.jerry89 Apr 25 '14 at 23:16
  • You're right, and I now see there are many related questions about this, plus the bug you referred to. Sorry. Anyway, for Emacs specifically, you may try to update (I'm using 24.3.1 which does not suffer from this). – laugh salutes Monica C Apr 25 '14 at 23:22
  • Thank you. You still helped me because now I can just use emacs outside of the terminal and it does everything I need. Thank you!!! – fusilli.jerry89 Apr 26 '14 at 00:01
  • 1
    I wish I found your tip 2 years ago, that would have saved me so many unwanted context switches to the global menu.. – Alexander van Trijffel Nov 11 '17 at 09:15
  • For CLI junkies out there, I think you should also be able to do this like so: gsettings set org.compiz.integrated show-hud "['disabled']" # or a different key-mapping – kvz Nov 12 '19 at 12:29
0

try to disable 'search' in settings->keyboard shortcuts.

sergio
  • 1