Provide a 'Paste mode' to allow a paste keybinding to be 'smart'. #7325

Open
opened 2026-01-31 01:01:10 +00:00 by claunia · 2 comments
Owner

Originally created by @enjibby on GitHub (Apr 7, 2020).

Description of the new feature/enhancement

As part of the discussion in https://github.com/microsoft/terminal/issues/968 there was a suggestion that, while creating a selection was a good cue for enabling a smart copy mode, there was no equivalent cue for smart paste.

Implementing a paste mode may be a good addition to assist those that wish to use Ctrl+V as both a paste key and a key combination in terminal apps.

Proposed technical implementation details (optional)

My idea is frankly quite vague. Apologies if it feels unreasonable.

Perhaps the terminal could, on app activation and in the event of a clipboard addition, detect the presence of a compatible item in the clipboard and enable a paste 'mode'. This would provide a visual cue that the paste keybinding(s) would paste rather than be sent through to the terminal. Once in this mode, an opportunity to cancel the mode would be available to the user, through a UI element and/or another keybinding.

Originally created by @enjibby on GitHub (Apr 7, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement As part of the discussion in https://github.com/microsoft/terminal/issues/968 there was a suggestion that, while creating a selection was a good cue for enabling a smart copy mode, there was no equivalent cue for smart paste. Implementing a paste mode may be a good addition to assist those that wish to use Ctrl+V as both a paste key and a key combination in terminal apps. # Proposed technical implementation details (optional) My idea is frankly quite vague. Apologies if it feels unreasonable. Perhaps the terminal could, on app activation and in the event of a clipboard addition, detect the presence of a compatible item in the clipboard and enable a paste 'mode'. This would provide a visual cue that the paste keybinding(s) would paste rather than be sent through to the terminal. Once in this mode, an opportunity to cancel the mode would be available to the user, through a UI element and/or another keybinding.
claunia added the Issue-FeatureProduct-TerminalArea-Extensibility labels 2026-01-31 01:01:10 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Apr 8, 2020):

Okay, I can kinda see the use of this. one keybinding that lets the user chose between "paste", "send ^V", or "Cancel". Makes sense. However, I think it would be best served as an extension rather than built-in by default. I'll tag this as such and add to the extensions megathread.

Thanks!

@zadjii-msft commented on GitHub (Apr 8, 2020): Okay, I can kinda see the use of this. one keybinding that lets the user chose between "paste", "send ^V", or "Cancel". Makes sense. However, I think it would be best served as an extension rather than built-in by default. I'll tag this as such and add to the extensions megathread. Thanks!
Author
Owner

@enjibby commented on GitHub (Apr 16, 2020):

It's important to note that I provided this example to make it simple to use just the Ctrl+V key combination to work as a user would expect in the correct situations. Requiring that a user press e.g. Ctrl+Shift+F7 to enter paste mode before pressing Ctrl+V does not provide value, nor does it work in the opposite situation where paste mode needs to be turned off every time a user wishes to send Ctrl+V to e.g. Vim. Having a visual cue to identify if paste mode is enabled is important, even if it is just a change to the display of the cursor (perhaps changing from a solid box to a &lt; sign?). being able to permanently enable or disable it is also desirable.

@enjibby commented on GitHub (Apr 16, 2020): It's important to note that I provided this example to make it simple to use *just* the Ctrl+V key combination to work as a user would expect in the correct situations. Requiring that a user press e.g. Ctrl+Shift+F7 to enter paste mode before pressing Ctrl+V does not provide value, nor does it work in the opposite situation where paste mode needs to be turned off every time a user wishes to send Ctrl+V to e.g. Vim. Having a visual cue to identify if paste mode is enabled is important, even if it is just a change to the display of the cursor (perhaps changing from a solid box to a `&lt;` sign?). being able to permanently enable or disable it is also desirable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7325