[PR #14775] Add support for a right-click context menu #30247

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

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

State: closed
Merged: Yes


Experimental for now. experimental.rightClickContextMenu, a per-profile setting. Long term we want to enable full mouse bindings, at which point this would be replaced.

Closes #3337

This adds two context menus to the TermControl - one for right-clicking with a selection, and one without. The implementation is designed to follows the API experience of the context menu on something like a RichEditBox. The hosting application adds a handler for the menu's Opening event, and appends whatever items it wants at that time.

So TermControl only implements a few "actions" by default - copy, past, find. TerminalApp is then responsible for adding anything else it needs. Right now, those actions are:

  • Duplicate tab
  • Duplicate pane
  • Close Tab
  • Close pane

Screenshots in https://github.com/microsoft/terminal/pull/14775#issuecomment-1415737393

**Original Pull Request:** https://github.com/microsoft/terminal/pull/14775 **State:** closed **Merged:** Yes --- Experimental for now. `experimental.rightClickContextMenu`, a per-profile setting. Long term we want to enable full mouse bindings, at which point this would be replaced. Closes #3337 This adds **two** context menus to the `TermControl` - one for right-clicking with a selection, and one without. The implementation is designed to follows the API experience of the context menu on something like a [`RichEditBox`](winui2gallery://item/RichEditBox). The hosting application adds a handler for the menu's `Opening` event, and appends whatever items it wants at that time. So `TermControl` only implements a few "actions" by default - copy, past, find. `TerminalApp` is then responsible for adding anything else it needs. Right now, those actions are: * Duplicate tab * Duplicate pane * Close Tab * Close pane Screenshots in https://github.com/microsoft/terminal/pull/14775#issuecomment-1415737393
claunia added the pull-request label 2026-01-31 09:39:34 +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#30247