19

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.

9

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 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 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 0:01
  • 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 9:15
16

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

enter image description here

  • 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
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.