-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
[Command Prompt] : User is not able to Select commands using 'Shift+ right/Left arrow keys' inside Command Prompt. #11985
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Our plan of record at the moment is to use mark mode (see #5804) to enable this functionality. This won't have exact parity with the vintage console's shift+arrows for selecting text in cmd.exe, but it should be close enough, with the possibility of being more powerful. |
## Summary of the Pull Request Introduces a non-configurable version of mark mode to Windows Terminal. It has the following interactions defined: - <kbd>ctrl+shift+m</kbd> --> Enter Mark Mode - when in Mark Mode... - <kbd>ESC</kbd> --> Exit Mark Mode - arrow keys --> move "start" - <kbd>shift</kbd> + arrow keys --> anchor "start", move "end" - <kbd>ctrl+a</kbd> --> select all - when a selection is active... When in mark mode, the cursor does not blink. ## References #4993 - [Epic] Keyboard Selection ## PR Checklist * [X] Closes #715 * [X] Provides a resolution for #11985 ## Detailed Description of the Pull Request / Additional comments - `TermControl`: - `TermControl.cpp` just adds logic to prevent the cursor from blinking when in mark mode - `ControlCore` - in the same place we handle quick edit, we add an entry point to mark mode - `TerminalCore` - this leverages `UpdateSelection()` and other quick edit functions to make mark mode happen ## Validation Steps Performed - [x] Make selection, split pane, close pane - NOTE: A similar scenario caused a crash at one point. Really weird. Keep an eye on it. - [x] Cursor is off when in mark mode - [x] general movement/selection - [x] general movement/selection that forces the viewport to move - [x] In mark mode, selectAll... - [x] arrow keys --> move start - [x] shift + arrow keys --> move end - [x] (regardless of mark mode) if selection active, enter --> copy to clipboard
We're gonna re-purpose this thread to track "implicit mark mode", for instant From #13369 (comment):
For more discussion, refer to → #13369 |
Just fyi specifically for shift+left, you'd have to go one character back before highlighting |
Why does nobody mention WSL? I'd like to be able to do this there too. Is there a reason for why it won't allow highlighting with keys? |
@lesleyrs, I expect that the feature that starts "implicit mark mode" when the user presses Shift+Left will be implemented in the terminal only, without changing anything in the console host. If it is implemented that way and enabled by the user, then it will work with WSL as well. Mark mode via Ctrl+Shift+M already works with WSL. |
Also, adding the following to your settings will work: {
"command":
{
"action": "markMode"
},
"keys": "shift+left"
}, Sure, it requires an extra keypress, but it'll get the job done. |
@zadjii-msft It seems there is no way to define actions per profile? Defined as is it will mess with profiles like PowerShell where selection with keyboard already works. |
That's correct, that's tracked in #5790 |
Windows Terminal version
1.12.3472.0
Windows build number
22509.1011
Other Software
**Test Environment: **
OS: Windows 11 Version Dev (OS Build 22509.1011)
App: Windows Terminal Preview
Screen Reader: Narrator
Steps to reproduce
Repro Steps:
1.Open Windows Terminal.
2.Open 'Command prompt' using 'Ctrl + Shift + 2' keys.
3.Now type any text in text-area of 'Command prompt'.
4.Now try to select the command text using 'Shift + right/left arrow'.
5.Observe the issue.
Users Experience
Users who rely on keyboard will get impacted here & fail to use the 'Command prompt' effectively, if User is not able to Select commands using 'Shift+ right/Left arrow keys' inside Command Prompt.
Attachment :
User is not able to Select commands using 'Shift+ right or Left arrow keys' inside Command Prompt..zip
Expected Behavior
User should be able to Select commands using 'Shift+ right/Left arrow keys' inside Command Prompt, which is happening in 'Windows Power shell' tab.
Actual Behavior
User is not able to Select commands using 'Shift+ right/Left arrow keys' inside Command Prompt.
The text was updated successfully, but these errors were encountered: