-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text selection using keyboard (Shift + arrow keys) #2372
Comments
I believe this is a duplicate of #715 |
I checked the feature from #715. This is not a duplicate. With above feature, the mentioned Shift + Ctrl + Arrow and Shift + Arrow keys still do not work in all modes. Only works in Powershell. Does not work in Command shell and also not in WSL Bash. Note, that CMD.exe supports those keys, but it works only when used without the terminal. |
Yeah mark mode isn't a substitution for this just working as expected in my opinion. I use a macbook and iterm2 for work and use ctrl shift to highlight, copy, paste text dozens of times a day. |
@bpinske have you tried adding a keybinding like: { "command": "markMode", "keys": "shift+left" }, That'll just immediately enter mark mode when you hit shift+left. It's like, one extra keystroke, but the UX is effectively the same. |
I will give that a shot later this evening. |
It is not a duplicate Shift + Ctrl + Arrow and Shift + Arrow keys still do not work in all modes. It only works in Powershell. |
@aliulashayir That's entirely a different thing. PowerShell maintains its own "selection" separate from the Terminal's. CMD.exe doesn't implement anything like that. It doesn't know how to backspace multiple characters at a time, and it doesn't know where the Terminal's selection is. This is an unfortunately weird aspect about the separation between shells and terminals. |
@zadjii-msft Oh, I didn't know that. It is annoying that these are not implemented the same way. I mean in the cmd without the new terminal app you can select with ctrl + shift + arrow key and then ctrl + backspace deletes the selection but you can't do it in the terminal app cmd |
@zadjii-msft Yes sorry I meant this but wrote it incorrectly. Still, this is better than nothing. For example, this is still useful when you are using a tool like yt-dlp and want to quickly delete a URL or something it is treated like a single word selection. I use, copy&paste URL s a lot so it is a nice to have |
I mean, Ctrl+Bksp will delete the previous "word" in CMD regardless of having text selected or not (in both Terminal and conhost). |
yes but can't select copy it though on Terminal cmd because you can't select the word and I guess not seeing the text highlighted just messes with my muscle memory. It is just a bit annoying that Powershell, cmd, wsl are different. Not a big problem. Thank you for your answers. I really appreciate that someone who works on the project takes the time to answer 🥇 |
@zadjii-msft Is there a way this can be implemented? It's really annoying not to be able to use Shift+arrow keys (standard LUA shortcuts for text editing for like at least 3-4 decades now). |
But you can select text with shift+arrow-keys in the legacy cmd prompt (W10)! |
so this will neer implemented?? why is this closed |
Description of the new feature/enhancement
We can currently select text in the terminal by dragging mouse with key pressed. Linux terminals and Windows command prompt allows you to select text by also Shift + arrow keys. I have tried this in the Windows terminal and instead of selecting the texts it just prints characters (Shift + right arrow prints 'D' for me).
Would be great to have the keyboard method for text selection for windows users. Would be very helpful for keyboard heavy users
Update
I checked that powershell on terminal works as expected
cmd on terminal doesn't print extra characters, the cursor just moves instead of selection
WSL prints extra characters (shift + right => D, Shift + left => C, etc)
The text was updated successfully, but these errors were encountered: