Shift modifer conficts between "disable mouse input" and "extend selection" #13171

Open
opened 2026-01-31 03:35:30 +00:00 by claunia · 8 comments
Owner

Originally created by @danfoster on GitHub (Mar 24, 2021).

Windows Terminal version (or Windows build number)

1.6.10571

Other Software

tmux 3.0a

Steps to reproduce

In Windows terminal, if you have an existing selection and then make a new selection while the shift key is held, the beginning of the selection is not changed, but instead of the selection is extended.

If you are using an application that supports mouse input (tmux in my example, but this should hold true for any application that supports mouse input), you have to hold the shift key to disable mouse input so you can natively select text in the terminal.

These 2 features conflict with each other as they are on the same modifier key (shift).

A common pattern for me in tmux, is I want to highlight some text, so I shift+select, but I miss my desired start of the selection, so I attempt to shift+select again, but due to the "extend select" feature, it doesn't move my starting position.
There is no-way I can find to clear the current selection using the mouse. My only workaround is to type a character and delete it again to clear my selection.

Expected Behavior

I would like to see a way to disable the "extend select" feature, or move it to a different modifier key, so it doesn't conflict.

Actual Behavior

See Steps to reproduce

Originally created by @danfoster on GitHub (Mar 24, 2021). ### Windows Terminal version (or Windows build number) 1.6.10571 ### Other Software tmux 3.0a ### Steps to reproduce In Windows terminal, if you have an existing selection and then make a new selection while the shift key is held, the beginning of the selection is not changed, but instead of the selection is extended. If you are using an application that supports mouse input (tmux in my example, but this should hold true for any application that supports mouse input), you have to hold the shift key to disable mouse input so you can natively select text in the terminal. These 2 features conflict with each other as they are on the same modifier key (shift). A common pattern for me in tmux, is I want to highlight some text, so I shift+select, but I miss my desired start of the selection, so I attempt to shift+select again, but due to the "extend select" feature, it doesn't move my starting position. There is no-way I can find to clear the current selection using the mouse. My only workaround is to type a character and delete it again to clear my selection. ### Expected Behavior I would like to see a way to disable the "extend select" feature, or move it to a different modifier key, so it doesn't conflict. ### Actual Behavior See Steps to reproduce
claunia added the Issue-TaskArea-InputProduct-TerminalArea-TerminalControl labels 2026-01-31 03:35:30 +00:00
Author
Owner

@DHowett commented on GitHub (Mar 24, 2021):

The solution we took for 1.7 is that Shift-clicking when there's no selection sets the selection start point. Is that an acceptable compromise?

@DHowett commented on GitHub (Mar 24, 2021): The solution we took for 1.7 is that Shift-clicking when there's _no selection_ sets the selection start point. Is that an acceptable compromise?
Author
Owner

@DHowett commented on GitHub (Mar 24, 2021):

(with esc for dismissing the selection- sorry; I didn't consider all of the issues there)

@DHowett commented on GitHub (Mar 24, 2021): (with <kbd>esc</kbd> for dismissing the selection- sorry; I didn't consider all of the issues there)
Author
Owner

@danfoster commented on GitHub (Mar 24, 2021):

It's not ideal imo, as this differs from the behavior of terminal emulators on different OSes, which makes moving between platforms and muscle memory conflict.
My preference would be that there is some method of making shift+click always start a new selection, but I do realise it's subjective at this point.

@danfoster commented on GitHub (Mar 24, 2021): It's not ideal imo, as this differs from the behavior of terminal emulators on different OSes, which makes moving between platforms and muscle memory conflict. My preference would be that there is some method of making shift+click always start a new selection, but I do realise it's subjective at this point.
Author
Owner

@Don-Vito commented on GitHub (Apr 11, 2021):

@DHowett, @danfoster - some terminals dismiss selection with shift click on the selection boundaries (anchor / end). We can easily implement. WDYT?

@Don-Vito commented on GitHub (Apr 11, 2021): @DHowett, @danfoster - some terminals dismiss selection with shift click on the selection boundaries (anchor / end). We can easily implement. WDYT?
Author
Owner

@DHowett commented on GitHub (Apr 12, 2021):

I don't mind that, yeah

@DHowett commented on GitHub (Apr 12, 2021): I don't mind that, yeah
Author
Owner

@YAMLcase commented on GitHub (Apr 14, 2021):

I'm not sure trying to get mouse event override and extend selection to co-exist is the best approach as even long standing terminal apps struggle with this clash.

putty for instance has options to have the mouse behave like windows or xterm (or a mix of the two). I for one have never once used shift to extend my selection, I just reselect if I'm not satisfied... however I also wouldn't presume anyone else to use my workflow.

image

Perhaps the way to go is add a suite of options to let people decide on their own with some reasonable defaults. Here's some ideas:

  • extend selection modifier key (shift, ctrl, alt, disabled)
  • mouse event override modifier key (shift, ctrl, alt, disabled)

FYI, more behaviors affected by this are shift + double and triple clicking won't select the entire word/line, it only selects from the beginning of the word/line to the character you're clicking on

@YAMLcase commented on GitHub (Apr 14, 2021): I'm not sure trying to get `mouse event override` and `extend selection` to co-exist is the best approach as even long standing terminal apps struggle with this clash. putty for instance has options to have the mouse behave like windows or xterm (or a mix of the two). I for one have never once used shift to extend my selection, I just reselect if I'm not satisfied... however I also wouldn't presume anyone else to use my workflow. ![image](https://user-images.githubusercontent.com/27447701/114741365-4fdf3d80-9d10-11eb-9052-9013b169ba32.png) Perhaps the way to go is add a suite of options to let people decide on their own with some reasonable defaults. Here's some ideas: - extend selection modifier key (shift, ctrl, alt, disabled) - mouse event override modifier key (shift, ctrl, alt, disabled) FYI, more behaviors affected by this are shift + double and triple clicking won't select the entire word/line, it only selects from the beginning of the word/line to the character you're clicking on
Author
Owner

@zadjii-msft commented on GitHub (Feb 25, 2022):

Hmm. Here's a thought: the selection anchors from #10865, we could make those draggable with the mouse even in mouse mode. Then you could just move the start anchor manually, even without shift.

Big picture there's also #1553 for more elaborate settings for mouse bindings.

@zadjii-msft commented on GitHub (Feb 25, 2022): Hmm. Here's a thought: the selection anchors from #10865, we could make those draggable with the mouse _even in mouse mode_. Then you could just move the start anchor manually, even without shift. Big picture there's also #1553 for more elaborate settings for mouse bindings.
Author
Owner

@DHowett commented on GitHub (Oct 1, 2025):

Copying @josefwells' request from #19321

Description of the new feature

Other terminal tools, specifically wsltty/mintty allow you to change the modifier between shift/ctrl/alt/win/off and also to invert the sense by changing the default click target between window/application.

Image This would make using windows terminal (specifically WSL) with tmux more natural and more like a native linux environment (copy with highlight, paste with right-click.. not additional modifiers needed).

Proposed technical implementation details

No response

@DHowett commented on GitHub (Oct 1, 2025): Copying @josefwells' request from #19321 > ### Description of the new feature > Other terminal tools, specifically wsltty/mintty allow you to change the modifier between shift/ctrl/alt/win/off and also to invert the sense by changing the default click target between window/application. > > <img alt="Image" width="795" height="682" src="https://private-user-images.githubusercontent.com/1197320/485919702-0f6b8dfc-8c89-4870-9833-4f1c70f338d7.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTkzNDY2NDQsIm5iZiI6MTc1OTM0NjM0NCwicGF0aCI6Ii8xMTk3MzIwLzQ4NTkxOTcwMi0wZjZiOGRmYy04Yzg5LTQ4NzAtOTgzMy00ZjFjNzBmMzM4ZDcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MTAwMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTEwMDFUMTkxOTA0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGM1MWNjNTcyZGQxMWY3OWE1YzJmYWUyOWFiNTZlYTg1YTQ0OGQ4NTFiYmU3ZmUzYjAyZjM2ODM5Y2UyNzY4ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.N_LEbB4RP8KTxCy8NXpC9G02Xakjwwwqg_q9YqHXWMI"> > This would make using windows terminal (specifically WSL) with tmux more natural and more like a native linux environment (copy with highlight, paste with right-click.. not additional modifiers needed). > > ### Proposed technical implementation details > _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13171