[PR #4819] Ignore right-click copy when copy on select is enabled #25970

Open
opened 2026-01-31 09:12:59 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4819

State: closed
Merged: Yes


Summary of the Pull Request

Right clicking on a focused tab while Copy On Select is active currently copies any active selection. This is because PointerReleasedHandler doesn't check for the mouse button that was released.
During a mouse button release, only the left mouse button release should be doing anything.

PR Checklist

Validation Steps Performed

These are the scenarios I've tested. They're a combination of in focus/out of focus, Copy On Select on/off, left/right click pressed and their move and release variants.

From Out of Focus:

  • Left Click = Focus
  • Left Click Move = Focus + Selection
  • Left Click Release
    • CoS on = Copy
    • CoS off = Nothing
  • Shift Left Click = Focus
  • Right Click
    • Focus
    • CoS on = Paste
    • CoS off = Copy if Active Selection, Paste if not.
  • Right Click Move = Nothing
  • Right Click Release = Nothing

From In Focus

  • Left Click = Selection if CoS off
  • Left Click Move = Selection
  • Left Click Release
    • CoS on = Copy
    • CoS off = Nothing
  • Shift Left Click = Set Selection Anchor
  • Right Click
    • CoS on = Paste
    • CoS off = Copy if Active Selection, Paste if not.
  • Right Click Move = Nothing
  • Right Click Release = Nothing
**Original Pull Request:** https://github.com/microsoft/terminal/pull/4819 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Right clicking on a focused tab while Copy On Select is active currently copies any active selection. This is because `PointerReleasedHandler` doesn't check for the mouse button that was released. During a mouse button release, only the left mouse button release should be doing anything. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #4740 * [x] CLA signed. * [x] Tests added/passed <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed These are the scenarios I've tested. They're a combination of in focus/out of focus, Copy On Select on/off, left/right click pressed and their move and release variants. From Out of Focus: - Left Click = Focus - Left Click Move = Focus + Selection - Left Click Release - CoS on = Copy - CoS off = Nothing - Shift Left Click = Focus - Right Click - Focus - CoS on = Paste - CoS off = Copy if Active Selection, Paste if not. - Right Click Move = Nothing - Right Click Release = Nothing From In Focus - Left Click = Selection if CoS off - Left Click Move = Selection - Left Click Release - CoS on = Copy - CoS off = Nothing - Shift Left Click = Set Selection Anchor - Right Click - CoS on = Paste - CoS off = Copy if Active Selection, Paste if not. - Right Click Move = Nothing - Right Click Release = Nothing
claunia added the pull-request label 2026-01-31 09:12:59 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25970