Skip to content

Instantly share code, notes, and snippets.

@valacar
Created April 14, 2015 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valacar/ae31ddb3f9659a891086 to your computer and use it in GitHub Desktop.
Save valacar/ae31ddb3f9659a891086 to your computer and use it in GitHub Desktop.
Sublime Text - disable menu keyboard shortcuts
// Place this in your Packages/User/ folder.
// Prevents Alt + f, i, v, g, t, p, n, and h key binds from opening the main menu.
[
{
"caption": "File",
"mnemonic": "",
"id": "file",
"children":
[
]
},
{
"caption": "Edit",
"mnemonic": "",
"id": "edit",
"children":
[
]
},
{
"caption": "Selection",
"mnemonic": "",
"id": "selection",
"children":
[
]
},
{
"caption": "Find",
"mnemonic": "",
"id": "find",
"children":
[
]
},
{
"caption": "View",
"mnemonic": "",
"id": "view",
"children":
[
]
},
{
"caption": "Goto",
"mnemonic": "",
"id": "goto",
"children":
[
]
},
{
"caption": "Tools",
"mnemonic": "",
"id": "tools",
"children":
[
]
},
{
"caption": "Project",
"mnemonic": "",
"id": "project",
"children":
[
]
},
{
"caption": "Preferences",
"mnemonic": "",
"id": "preferences",
"children":
[
]
},
{
"caption": "Help",
"mnemonic": "",
"id": "help",
"children":
[
]
}
]
@RFV
Copy link

RFV commented Sep 21, 2016

Thank you very much for this, it solves a common problem for many

@rathboma
Copy link

You++

@kungfusheep
Copy link

Thanks!

@felixcatto
Copy link

Big thanks

@Dxhs
Copy link

Dxhs commented Feb 18, 2021

Any possible addition to this that would stop the whole menubar from appearing when just pressing Alt?

@valacar
Copy link
Author

valacar commented Feb 18, 2021

Any possible addition to this that would stop the whole menubar from appearing when just pressing Alt?

Not that I know of. However, if you're on Windows, you can use AutoHotkey to disable the key release for left Alt key with this script:

#IfWinActive ahk_exe sublime_text.exe
    ~LAlt Up::return
#IfWinActive

@Dxhs
Copy link

Dxhs commented Feb 18, 2021

Any possible addition to this that would stop the whole menubar from appearing when just pressing Alt?

Not that I know of. However, if you're on Windows, you can use AutoHotkey to disable the key release for left Alt key with this script:

#IfWinActive ahk_exe sublime_text.exe
    ~LAlt Up::return
#IfWinActive

Thanks for the answer. Yes I'm forced to use Windows at work... I tried that piece of code earlier today and it doesn't seem to work as of late. People who reported it working were on Windows 7.

@felixcatto
Copy link

Big thanks 🔥 🥰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment