|
| 1 | +// These VSCode keybindings are required for the PSReadLine configuration in file:///./statements.ps1 |
| 2 | +[ |
| 3 | + // PSReadline mitigations |
| 4 | + { "key": "ctrl+enter", "command": "workbench.action.terminal.sendSequence", |
| 5 | + "when": "terminalFocus && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'", |
| 6 | + "args": {"text":"\u001b[24~m"} }, |
| 7 | + { "key": "ctrl+shift+enter", "command": "workbench.action.terminal.sendSequence", |
| 8 | + "when": "terminalFocus && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'", |
| 9 | + "args": {"text":"\u001b[24~n"} }, |
| 10 | + { "key": "ctrl+shift+c", "command": "workbench.action.terminal.sendSequence", |
| 11 | + "when": "terminalFocus && !terminalTextSelectedInFocused && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'", |
| 12 | + "args": {"text":"\u001b[24~o"} }, |
| 13 | + { "key": "ctrl+insert", "command": "workbench.action.terminal.sendSequence", |
| 14 | + "when": "terminalFocus && !terminalTextSelectedInFocused && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'", |
| 15 | + "args": {"text":"\u001b[24~o"} }, |
| 16 | + { "key": "ctrl+shift+9", "command": "workbench.action.terminal.sendSequence", |
| 17 | + "when": "terminalFocus && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'", |
| 18 | + "args": { "text": "\u001b[24~p" } }, |
| 19 | + { "key": "shift+alt+oem_4", "command": "workbench.action.terminal.sendSequence", |
| 20 | + "when": "terminalFocus && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'", |
| 21 | + "args": { "text": "\u001b[24~q" } }, |
| 22 | + { "key": "alt+0", "command": "-workbench.action.lastEditorInGroup" }, |
| 23 | + { "key": "alt+0", "command": "workbench.action.lastEditorInGroup", |
| 24 | + "when": "!terminalFocus" }, |
| 25 | + |
| 26 | + // Unified terminal scrolling |
| 27 | + { "key": "ctrl+pageup", "command": "-workbench.action.terminal.focusPrevious", |
| 28 | + "when": "terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus" }, |
| 29 | + { "key": "ctrl+pageup", "command": "workbench.action.terminal.scrollUpPage", |
| 30 | + "when": "terminalFocusInAny && terminalHasBeenCreated && !terminalAltBufferActive || terminalFocusInAny && terminalProcessSupported && !terminalAltBufferActive" }, |
| 31 | + { "key": "ctrl+pagedown", "command": "-workbench.action.terminal.focusNext", |
| 32 | + "when": "terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus" }, |
| 33 | + { "key": "ctrl+pagedown", "command": "workbench.action.terminal.scrollDownPage", |
| 34 | + "when": "terminalFocusInAny && terminalHasBeenCreated && !terminalAltBufferActive || terminalFocusInAny && terminalProcessSupported && !terminalAltBufferActive" }, |
| 35 | + { "key": "ctrl+up", "command": "-workbench.action.terminal.scrollToPreviousCommand", |
| 36 | + "when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled" }, |
| 37 | + { "key": "alt+up", "command": "workbench.action.terminal.scrollToPreviousCommand", |
| 38 | + "when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled" }, |
| 39 | + { "key": "ctrl+down", "command": "-workbench.action.terminal.scrollToNextCommand", |
| 40 | + "when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled" }, |
| 41 | + { "key": "alt+down", "command": "workbench.action.terminal.scrollToNextCommand", |
| 42 | + "when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled" }, |
| 43 | + { "key": "ctrl+up", "command": "workbench.action.terminal.scrollUp", |
| 44 | + "when": "terminalFocusInAny && terminalHasBeenCreated && !terminalAltBufferActive || terminalFocusInAny && terminalProcessSupported && !terminalAltBufferActive" }, |
| 45 | + { "key": "ctrl+down", "command": "workbench.action.terminal.scrollDown", |
| 46 | + "when": "terminalFocusInAny && terminalHasBeenCreated && !terminalAltBufferActive || terminalFocusInAny && terminalProcessSupported && !terminalAltBufferActive" }, |
| 47 | +] |
0 commit comments