Can not override or disable the default key ‘Alt’

I customize Alt-m key binding to toggle menu-bar display/hide.

‘body’:
‘alt-m’: ‘window:toggle-menu-bar’

But, the defalut key Alt is still available.

This always cause the menu-bar display/hide actions when I use Alt key for others.
So, hope to disable or override the default Alt keymap.


Version: 0.187.0
OS: Linux

6 thoughts on “Can not override or disable the default key ‘Alt’

  1. This worked for me, I’m using Ubuntu with i3wm and OpenBox
    Add this to your keymap.cson
    ‘atom-text-editor’:
    ‘alt’: ‘ ‘

    I hope this works for you guys 🙂 …this was driving me crazy.

  2. @angelojulioth Thanks so much, that did the trick.

    To rebind it to another key, you can add something like this in the keymap file:

    '.platform-win32, .platform-linux':
      'ctrl-q': 'window:toggle-menu-bar'
    

    Although that makes the info popup window open everytime…

  3. The below fixed this completely for me (on Ubuntu):

    '.platform-win32, .platform-linux':
      'alt': 'abort!'
      'alt-f1': 'window:toggle-menu-bar'

    This actually works for disabling the default Alt binding as well!

    It behaves a little differently than Alt, because the menu bar stays visible until you toggle it back off (and there’s the popup, like @LoLei mentioned). I don’t mind the “permanent” toggle, I actually prefer it that way.