I am using git bash through the VS Code integrated terminal. I want to use shift
and the left/right arrow keys to select text. This feature used to be working but broke for me recently, and I can't identify why. Arrow keys work fine for moving the cursor, but in combination with shift
they produce ABCD characters rather than selecting the text. Using shift-ctrl-arrow key
(which should select whole words) also produces ABCD characters.
In standalone git bash, shift+arrow keys has no effect, so I suspect it might be a VS Code feature that isn't functioning correctly.
I am using git for Windows version 2.38.1.windows.1 (with mintty) and VS Code version 1.73.1. I am using default settings for VS Code's terminal. My $TERM
variable in the integrated terminal is xterm-256color
.
What I've tried
I've tried everything I can find Googling this issue:
Shift-arrow keys send ABCD in Git Bash on Windows 10: tried reinstalling git (and VS Code), my ALT
key is not pressed
arrow keys no longer scroll in less in Windows Terminal (comment): tried this even though I'm not using Windows Terminal. Adding export MSYS=enable_pcon
to ~/.bashrc
did not change anything.
How can I make ctrl+right/left arrow jump words in Visual Studio Code: I'm not on MacOS, but I still tried changing keybindings in VS Code. I added this to keybindings.json
:
{
"key": "shift+left",
"command": "cursorLeftSelect",
"when": "terminalFocus"
},
This has no effect; neither does cursorWordLeftSelect
for shift+ctrl+left
. Changing command
to workbench.action.terminal.kill
does have an effect, so I know VS Code is registering the key combination.
All told, I'm completely stuck on this issue. I clearly remember this feature working, and I can't figure out what changed. Tips/guidance appreciated.