How to override the default menu-bar toggle key 'alt'?


#1

I’m using Atom on Linux, to toggle the menu-bar, the default key is ‘alt’.
But when I want to toggle other functions which binding with ‘alt-’, always cause the menu-bar display/hide firstly when I press ‘alt’.
So, I want to override this key with other, for example ‘alt-m’, I add the customize key to keymap.cson file:

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

But the single ‘alt’ is still avaiable to toggle the menu-bar.
So, I want to know how to disable or override the default ‘alt’ key.

Thanks!


#2

I can’t find the Alt in any of the keymaps in core, so I’m afraid you can’t overwrite/disable it (yet). You should create an issue on the github repo if there isn’t already one.


#3

@olmokramer Thanks for your answer, actually I’m not sure it’s a issue for Atom, so I discuss it here firstly. Maybe I need to create a issue on Github now. :smiley:


#4

I already created an issue on Github .


#5

@mengzyou I suggest you post the issue in the atom-shell repo. The Alt key functionality is hard-coded in native_window_views.cc