feat(keybindings): enhance navigation and terminal pane focus keybindings for improved workflow

This commit is contained in:
Jim Myhrberg
2025-10-23 14:52:46 +01:00
parent 38def73c8b
commit 42e2d14e5e
2 changed files with 88 additions and 4 deletions

View File

@@ -27,6 +27,58 @@
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.exafunction\\.windsurf",
"^com\\.microsoft\\.VSCode",
"^com\\.todesktop\\."
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "l",
"modifiers": {
"mandatory": ["option"],
"optional": ["caps_lock"]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": ["left_option", "left_command"]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.exafunction\\.windsurf",
"^com\\.microsoft\\.VSCode",
"^com\\.todesktop\\."
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["option"],
"optional": ["caps_lock"]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": ["left_option", "left_command"]
}
],
"type": "basic"
},
{
"conditions": [
{
@@ -74,7 +126,7 @@
"to": [
{
"key_code": "right_arrow",
"modifiers": ["left_option", "left_command"]
"modifiers": ["left_option", "left_command", "shift"]
}
],
"type": "basic"

View File

@@ -312,11 +312,23 @@
},
{ // Navigate right.
"key": "alt+l",
"command": "workbench.action.navigateRight"
"command": "workbench.action.navigateRight",
"when": "!panelFocus"
},
{ // Navigate right.
"key": "cmd+alt+right",
"command": "workbench.action.navigateRight",
"when": "!panelFocus"
},
{ // Navigate left.
"key": "alt+j",
"command": "workbench.action.navigateLeft"
"command": "workbench.action.navigateLeft",
"when": "!panelFocus"
},
{ // Navigate left.
"key": "cmd+alt+left",
"command": "workbench.action.navigateLeft",
"when": "!panelFocus"
},
{ // Navigate down.
"key": "alt+k",
@@ -335,6 +347,26 @@
"command": "workbench.action.focusActiveEditorGroup",
"when": "panelFocus"
},
{ // Focus next terminal pane.
"key": "alt+l",
"command": "workbench.action.terminal.focusNextPane",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{ // Focus next terminal pane.
"key": "cmd+alt+right",
"command": "workbench.action.terminal.focusNextPane",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{ // Focus previous terminal pane.
"key": "alt+j",
"command": "workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{ // Focus previous terminal pane.
"key": "cmd+alt+left",
"command": "workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
//
// ===========================================================================
// MARK: Searching
@@ -514,7 +546,7 @@
//
// This is a workaround for alt+e not working in VSCode. Relies on
// Karabiner-Elements to remap alt+e to cmd+alt+right.
"key": "cmd+alt+right",
"key": "cmd+shift+alt+right",
"command": "emacs-mcx.forwardParagraph",
"when": "editorTextFocus && !suggestWidgetVisible"
},