Add support for Windows clipboard history (Win+V) in bash #18580

Closed
opened 2026-01-31 06:18:21 +00:00 by claunia · 4 comments
Owner

Originally created by @happylynx on GitHub (Oct 2, 2022).

Add support for Windows clipboard history activated by Win+V in bash.

  • When running PowerShell, paste from clipboard history works ok.
  • When running bash in its own window (i.e. not using Window Terminal, from MSYS2 project or Git), paste from clipboard history works ok.
  • When running bash in Windows Terminal window (in any way - C:\Windows\System32\bash.exe, from Windows Subsystem for Linux, executable from Msys2, ssh connection to a Linux machine) and paste from clipboard history is activated, it does nothing for the first time and it prints ^V for the second time.

Version

Windows Terminal Preview, Version: 1.16.2642.0

Originally created by @happylynx on GitHub (Oct 2, 2022). Add support for Windows clipboard history activated by Win+V in bash. * When running PowerShell, paste from clipboard history works ok. * When running bash in its own window (i.e. not using Window Terminal, from MSYS2 project or Git), paste from clipboard history works ok. * When running bash in Windows Terminal window (in any way - `C:\Windows\System32\bash.exe`, from Windows Subsystem for Linux, executable from Msys2, ssh connection to a Linux machine) and paste from clipboard history is activated, it does nothing for the first time and it prints `^V` for the second time. #### Version Windows Terminal Preview, Version: 1.16.2642.0
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Author-Feedback labels 2026-01-31 06:18:22 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Oct 3, 2022):

Do you have ctrl+v bound to paste in your settings/? Clipboard History works by just sending a literal ctrl+v key to the window, so if that's not bound to paste, then it won't work for pasting.

@zadjii-msft commented on GitHub (Oct 3, 2022): Do you have `ctrl+v` bound to paste in your settings/? Clipboard History works by just sending a literal ctrl+v key to the window, so if that's not bound to paste, then it won't work for pasting.
Author
Owner

@ghost commented on GitHub (Oct 7, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Oct 7, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@SaltyChiang commented on GitHub (Oct 26, 2022):

@zadjii-msft It is annoying to bind ctrl+v to paste while using vim. Vim default bind ctrl+v to toggle visual block mode which is very useful. Is there any workaround to make clipboard history work without editing the default key binding in vim? As mentioned above, clipboard history works well in mintty shipped with msys2.

@SaltyChiang commented on GitHub (Oct 26, 2022): @zadjii-msft It is annoying to bind `ctrl+v` to paste while using vim. Vim default bind `ctrl+v` to toggle visual block mode which is very useful. Is there any workaround to make clipboard history work without editing the default key binding in vim? As mentioned above, clipboard history works well in mintty shipped with msys2.
Author
Owner

@zadjii-msft commented on GitHub (Oct 26, 2022):

This is just a quick thought, but you might be able to bind ctrl+v to multipleActions([paste, sendInput('^V')]), so that when Terminal receives a Ctrl+V, it both pastes, and sends a literal ^V to the client application (that vim can read).

I have not tested this, but it's a thought.

@zadjii-msft commented on GitHub (Oct 26, 2022): This is just a quick thought, but you might be able to bind ctrl+v to `multipleActions([paste, sendInput('^V')])`, so that when Terminal receives a Ctrl+V, it both pastes, and sends a literal ^V to the client application (that vim can read). I have not tested this, but it's a thought.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18580