fix(cursor): add alt keybinds for ctrl+f/b/n/p keys

This commit is contained in:
2025-03-06 02:42:13 +00:00
parent cebbd21e9b
commit 842fe398d7
2 changed files with 51 additions and 0 deletions

View File

@@ -29,6 +29,10 @@
"key": "cmd+0", "key": "cmd+0",
"command": "workbench.action.zoomReset" "command": "workbench.action.zoomReset"
}, },
{ // Toggle sidebar visibility.
"key": "ctrl+s",
"command": "workbench.action.toggleSidebarVisibility"
},
// //
// =========================================================================== // ===========================================================================
// MARK: Window Tabs // MARK: Window Tabs
@@ -54,6 +58,14 @@
"key": "ctrl+z ctrl+p", "key": "ctrl+z ctrl+p",
"command": "workbench.action.showPreviousWindowTab" "command": "workbench.action.showPreviousWindowTab"
}, },
{ // Go to previous window tab.
//
// This is a workaround for ctrl+p not working globally as up arrow in
// all input fields. This relies on Karabiner-Elements to remap ctrl+p to
// up arrow.
"key": "ctrl+z up",
"command": "workbench.action.showPreviousWindowTab"
},
{ // Go to previous window tab. { // Go to previous window tab.
"key": "shift+cmd+[", "key": "shift+cmd+[",
"command": "workbench.action.showPreviousWindowTab" "command": "workbench.action.showPreviousWindowTab"
@@ -97,6 +109,15 @@
"command": "file-browser.open", "command": "file-browser.open",
"when": "editorTextFocus" "when": "editorTextFocus"
}, },
{ // Open file via file browser extension.
//
// This is a workaround for ctrl+f not working globally as right arrow in
// all input fields. This relies on Karabiner-Elements to remap ctrl+f to
// right arrow.
"key": "ctrl+x right",
"command": "file-browser.open",
"when": "editorTextFocus"
},
{ // Open quick open. { // Open quick open.
"key": "ctrl+x ctrl+;", "key": "ctrl+x ctrl+;",
"command": "workbench.action.quickOpen" "command": "workbench.action.quickOpen"
@@ -120,6 +141,15 @@
"command": "workbench.action.showAllEditorsByMostRecentlyUsed", "command": "workbench.action.showAllEditorsByMostRecentlyUsed",
"when": "!terminalFocus" "when": "!terminalFocus"
}, },
{ // Show all editors by most recently used.
//
// This is a workaround for ctrl+b not working globally as left arrow in
// all input fields. This relies on Karabiner-Elements to remap ctrl+b to
// left arrow.
"key": "ctrl+x left",
"command": "workbench.action.showAllEditorsByMostRecentlyUsed",
"when": "!terminalFocus"
},
{ // Close active editor. { // Close active editor.
"key": "ctrl+x ctrl+k", "key": "ctrl+x ctrl+k",
"command": "workbench.action.closeActiveEditor", "command": "workbench.action.closeActiveEditor",
@@ -433,6 +463,15 @@
"command": "editor.action.formatDocument", "command": "editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly" "when": "editorTextFocus && !editorReadonly"
}, },
{ // Format document.
//
// This is a workaround for ctrl+f not working globally as right arrow in
// all input fields. This relies on Karabiner-Elements to remap ctrl+f to
// right arrow.
"key": "ctrl+c right",
"command": "editor.action.formatDocument",
"when": "editorTextFocus && !editorReadonly"
},
{ // Duplicate selection. { // Duplicate selection.
"key": "ctrl+x ctrl+d", "key": "ctrl+x ctrl+d",
"command": "editor.action.duplicateSelection" "command": "editor.action.duplicateSelection"
@@ -627,6 +666,15 @@
"command": "macros.runTestDebugFailTests", "command": "macros.runTestDebugFailTests",
"when": "editorTextFocus" "when": "editorTextFocus"
}, },
{ // Debug failed tests.
//
// This is a workaround for ctrl+f not working globally as right arrow in
// all input fields. This relies on Karabiner-Elements to remap ctrl+f to
// right arrow.
"key": "ctrl+c right",
"command": "macros.runTestDebugFailTests",
"when": "editorTextFocus"
},
{ // Debug last run. { // Debug last run.
"key": "ctrl+c , d", "key": "ctrl+c , d",
"command": "macros.runTestDebugLastRun", "command": "macros.runTestDebugLastRun",

View File

@@ -66,6 +66,9 @@
// Modified Tabs // Modified Tabs
"workbench.editor.highlightModifiedTabs": true, "workbench.editor.highlightModifiedTabs": true,
// //
// Accessibility
"editor.accessibilitySupport": "off",
//
// =========================================================================== // ===========================================================================
// MARK: Workbench // MARK: Workbench
// =========================================================================== // ===========================================================================