Using Pentadactyl, when I press the Alt key, it toggles the menu bar, and the --MENU-- mode. This is very embarrassing for me, as I use dwm window manager at the same time, where Alt is the most important meta key, so I hit it very often. How can I disable Pentadactyl's behaviour? I mean, I want it to do nothing when I press Alt. I already tried to remap Alt or Meta to nothing:

:map <A> <Nop>
:map <M> <Nop>

But it doesn't work.

  • It’s very strange for me since on my system <Alt> does not set focus on menu bar neither in Pentadactyl nor in pure Iceweasel (Firefox) nor in any GTK+ app. And I don’t remember that I’ve done anything special to disable it. So most probably your question have no any relations to Pentadactyl. Jun 18, 2014 at 12:30
  • Thank you for your comment! You are right, this keystroke is just passed to Firefox, and it only does it's default behaviour. I found the solution, I will write it in an answer.
    – deeenes
    Jun 19, 2014 at 23:44

4 Answers 4


Summary: in about:config, toggle ui.key.menuAccessKeyFocuses to false.

Actually recently this is the normal behaviour of Firefox. Recently, because few versions earlier it was not like this. And using extensions like Pentadactyl or Vimperator, it is very apparent and annoying, while possibly with the default user interface it's convenient. So I searched for related Firefox settings, and I found, the ui.key.menuAccessKey and ui.key.menuAccessKeyFocuses. First I had the intuition that the first needed to change, which was set to 18, which means the Alt key. I set it to 0, without any effect. Then I changed the latter, from true to false, and the issue become resolved.

  • 4
    Right now, you need to change ui.key.menuAccessKey. ui.key.menuAccessKeyFocuses will be reset (on start?) if you have the menu bar hidden, so it most likely has no (useful and persistent) effect. This is part of a "bug fix", also introduced to solve what is an accessibility problem for people who use the menu bar interface. Apparently, under GTK, this setting is explicitly set to the boolean negation of the visibility attribute of the menu bar.
    – njsg
    Jun 28, 2014 at 7:59
  • 3
    Thanks for pointing this out, indeed, the ui.key.menuAccessKeyFocuses is reset at restart, and sometimes randomly while running. Now I changed ui.key.menuAccessKey to 0, and surprisingly it works.
    – deeenes
    Jul 1, 2014 at 10:44
  • 1
    @njsg I found out that ui.key.menuAccessKeyFocuses is set to true when you hide menubar with set guioptions-=m. So you have to place set! ui.key.menuAccessKeyFocuses=false after set guioptions-=m in your ~/.pentadactylrc. Jul 24, 2014 at 16:45
  • @njsg What I said in previous comment is enough for FF 30, but not for FF 31 where you indeed need to set ui.key.menuAccessKey=0 Jul 26, 2014 at 15:16
  • I want the menu access key, but it's annoying when I change my mind about using an Alt combination and the menu bar activates. The setting FF could really do with is ui.key.menuAccessKeyTimeout. A timeout is sensible for something like this, so tapping the key will activate the behaviour, but pausing on it and changing your mind will have no effect. Xscape uses a timeout, for example.
    – pyrocrasty
    Aug 12, 2015 at 21:34

Nice, the Alt will not toggle the Menu bar with my Iceweasel (Firefox) on Debian 7.

$ vim ~/.pentadactylrc

set guioptions=BNs

"  - Disable Alt key to toggle hidden Menu bar for Debian, Ubuntu.
set guioptions-=m
set! ui.key.menuAccessKeyFocuses=false

  1. the set! ui.key.menuAccessKeyFocuses=false need to after the set guioptions-=m.

  2. Here is my patch - [issue #6] Disable menu bar toggle by for Pentadactyl · chusiang/tuxENV@b4a7279.


Seeing as you're using dwm it might suit you better to just remap dwm's MODKEY, I prefer using the super, or "windows", key for this.

see this link for how to and a list of modkeys you can use.

It's preferable this way as a lot of applications like to map ALT.

  • I have personally switched the hardware key mapping of SUPER and ALT, and then used the fake SUPER key as my modkey. Then the SUPER key behaves as ALT in applications.
    – Vortico
    Jan 14, 2016 at 23:12

I prefer that the menu bar be always visible whether or not Alt is pressed. This can be done as follows:

  1. Click the Firefox menu button (normally located at the far right beside the URL and Search boxes)
  2. Choose Customize at the bottom of the Firefox menu.
  3. At the bottom of the next screen that appears, click Show/Hide Toolbars dropdown menu, then place a check mark next to Menu Bar menu item.
  4. Finally, click Exit Customize at the lower right.

The menu bar should now always be visible and pressing Alt should have no effect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .