You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
[
|
|
// Map the physical 'CapsLock' key to act as the 'Escape' key
|
|
{
|
|
"key": "capslock",
|
|
"command": "workbench.action.terminal.sendSequence",
|
|
"args": {
|
|
"text": "\u001b" // ASCII code for Escape
|
|
},
|
|
// Optional: you can restrict this to the terminal or use no 'when' condition
|
|
// "when": "terminalFocus"
|
|
},
|
|
{
|
|
"key": "capslock",
|
|
"command": "workbench.action.closeMessages",
|
|
"when": "notificationVisible"
|
|
},
|
|
{
|
|
"key": "capslock",
|
|
"command": "closeCommandCenter",
|
|
"when": "commandCenterVisible"
|
|
},
|
|
// The most important one: to exit common modes/menus/widgets
|
|
{
|
|
"key": "capslock",
|
|
"command": "workbench.action.closeAllGroups",
|
|
"when": "editorFocus"
|
|
},
|
|
{
|
|
"key": "capslock",
|
|
"command": "workbench.action.closeActiveEditor",
|
|
"when": "editorFocus"
|
|
},
|
|
{
|
|
"key": "capslock",
|
|
"command": "workbench.action.closePanel",
|
|
"when": "panelFocus"
|
|
}
|
|
// ... you may need to map it to several common "escape" actions
|
|
]
|