Skip to content
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

Closed
vineethrp opened this issue Aug 9, 2019 · 15 comments
Closed

Text selection using keyboard (Shift + arrow keys) #2372

vineethrp opened this issue Aug 9, 2019 · 15 comments
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@vineethrp
Copy link

vineethrp commented Aug 9, 2019

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)

@vineethrp vineethrp added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 9, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 9, 2019
@cinnamon-msft cinnamon-msft added Area-Input Related to input processing (key presses, mouse, etc.) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 9, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 9, 2019
@cinnamon-msft
Copy link
Contributor

I believe this is a duplicate of #715

@mfriedrich74
Copy link

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.

@bpinske
Copy link

bpinske commented Jul 10, 2023

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.
This is a pretty serious UX gap when I try to use WSL/Terminal on my personal computer.

@zadjii-msft
Copy link
Member

@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.

@bpinske
Copy link

bpinske commented Jul 10, 2023

I will give that a shot later this evening.
Thanks for the suggestion.

@aliulashayir
Copy link

aliulashayir commented Aug 1, 2023

I believe this is a duplicate of #715

It is not a duplicate Shift + Ctrl + Arrow and Shift + Arrow keys still do not work in all modes. It only works in Powershell.
Markdown mode isn't enough. When you try to delete selected text with it will just delete the last character in cmd

@zadjii-msft
Copy link
Member

@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.

@aliulashayir
Copy link

@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
Copy link
Member

in the cmd without the new terminal app you can select with ctrl + shift + arrow key and then ctrl + backspace deletes the selection

Does it though? ctrl+bksp will delete the previous word, but I don't believe it'll delete the entire selection:

e786f81c-aab1-46f5-bbf5-8b41319bbc52

@aliulashayir
Copy link

@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
ezgif-3-34dca50bec

@zadjii-msft
Copy link
Member

I mean, Ctrl+Bksp will delete the previous "word" in CMD regardless of having text selected or not (in both Terminal and conhost).

@aliulashayir
Copy link

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 🥇

@levicki
Copy link

levicki commented Jul 18, 2024

@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).

@BWWIT
Copy link

BWWIT commented Nov 9, 2024

@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.

But you can select text with shift+arrow-keys in the legacy cmd prompt (W10)!
That contradict the above statement, that it's not possible to get the functionality with cmd.

@myudak
Copy link

myudak commented Nov 28, 2024

so this will neer implemented?? why is this closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

9 participants