Stop key Alt brings up the menu in Sublime Text 2

I am an Emacs user who looks in Sublime Text 2. I recreated the default Emacs key bindings and used to navigate Alt + i, Alt + k, Alt + j, Alt + l for up, down, left, and right. I had no problem reassigning these keys in Sublime Text.

The problem is that whenever I use these keys to navigate the menu, it pops up, although I hid it in distraction mode. I would like to stop the menu up when I press the Alt key.

If possible, I would like to reassign the key to display the menu on something else (e.g. Alt + space). Otherwise, I would like to disable the menu, which still has the Alt key (and use all the keyboard shortcuts and the console).

I am running Sublime Text on Windows XP.

+5
source share
2 answers

The problem I encountered was that the key I was rewriting contradicted the mnemonics in the menu. In particular, I had Alt + i mapped to something, while it was also a mnemonic for Find.

To fix the problem, I removed the mnemonics from the menu, which stopped the menu from appearing. To do this, go to the menu "Settings" → "Browse packages" and open the menu file "Default / Main.sublime". There you can delete all the "mnemonic": "*" lines to get rid of the mnemonics.

Pressing the alt key still brings up the menu. If you want to disable this, you can use the following AutoHotkey script function (thanks Armin):

SetTitleMatchMode RegEx
#IfWinActive .*Sublime Text 2.*
    LAlt & esc::return ;This can be any key, not just escape. It needed to get AutoHotkey to treat Alt as a prefix key.
    ~LAlt::return
#IfWinActive

Alt, , Alt .

+4

Autohotkey, # IfWinActive, , . .

#IfWinActive, Emacs ; the name of the window
~LAlt::return ;this enables the LAlt + hotkey action but disables LAlt
LAlt & space::tooltip,do stuff
...
#IfWinActive ;end
+1

All Articles