Powertoys: X Clipboard

Created on 7 May 2019  Â·  15Comments  Â·  Source: microsoft/PowerToys

Select to copy, middle click to paste

Idea-New PowerToy

Most helpful comment

Hi @scottven ,
Could you please add some details to this suggestion? It's not clear what this PowerToy would do.

I believe the issue is for a new tool inspired by Xwindows behavior, like Xmouse. If this were to be implemented, I would recommend going all the way, and including a clipboard manager which supports access to previous clipboard entries. This could be further extended to be a more Windows-y tool by allowing one to access individual OLE variants (or whatever they're dubbed) in the clipboard e.g; when copying an object in some software (such as SPSS), multiple forms of the object (PNG, HTML, text) may be placed in the clipboard.

All 15 comments

Uhm, do you mean scroll click?

Hi @scottven ,
Could you please add some details to this suggestion? It's not clear what this PowerToy would do.

Any time the mouse is used to select text, the PowerToy would automatically copy that selection to the clipboard. Any time the middle (scroll wheel) button is clicked, it would paste.

Hi @scottven ,
Could you please add some details to this suggestion? It's not clear what this PowerToy would do.

I believe the issue is for a new tool inspired by Xwindows behavior, like Xmouse. If this were to be implemented, I would recommend going all the way, and including a clipboard manager which supports access to previous clipboard entries. This could be further extended to be a more Windows-y tool by allowing one to access individual OLE variants (or whatever they're dubbed) in the clipboard e.g; when copying an object in some software (such as SPSS), multiple forms of the object (PNG, HTML, text) may be placed in the clipboard.

+1 I’ve always liked Xwindows’ ability to do this (auto-copy to clipboard upon highlight) and would like to see it in Windows. Also, having easy access to previous clipboard entries would be a big win.

Hi @jpinkham , You can already enable and use Clipboard History by using the "Windows Key + V" keyboard shortcut.

Check out #127. Which is a much better implementation of this. Copy on select is not a good idea as it would clutter the clipboard/clipboard manager.

Check out #127. Which is a much better implementation of this. Copy on select is not a good idea as it would clutter the clipboard/clipboard manager.

That looks interesting, but I've spent too long living with X clipboard behavior that anything else is just a hassle to use.

@scottven If #127 is implemented as I've explained then you should be able to write a custom script to copy to clipboard on select. I do believe this is a behaviour a lot people would not want, especially someone who uses clipboard manager. Or someone working in an IDE, I select a lot of stuff all day long. Or people who do have middle mouse button (e.g. trackpad).

Only people I see wanting this, is whose job includes a lot of sequential copy-paste. As personally majority of the time I do not copy all the stuff I select. Those people could also hugely benefit by using a clipboard manager imo.

This comment did remind me of this :)
xkcd

@lordlycastle i mis-stated in my previous comment (mentioning clipboard) when I now realized a key piece of information is missing from this discussion, which may help you understand why this request isn’t silly: the buffer used by xwindows for highlighting text is NOT the clipboard. THIS is the behavior that we are looking for. We want an immediate paste ability of highlighted selection, without necessarily cluttering the clipboard history (but this should be a config option). I have used and loved this feature of xwindows for 20 years.

To get highlighted text into the clipboard buffer, the user must explicitly request to copy it (ex: ctrl+c).

Reference: https://linux.die.net/man/1/xsel

Reference: “Clipboard” section of https://en.m.wikipedia.org/wiki/X_Window_selection

@jaimecbernardo: Thanks for the info on Win+V. I determined I don’t have clipboard history because my company’s laptops are using an older build of win10, before this functionality was added.

Hi friends, i'm trying to better understand this and the end to end scenario(s). First, @jpinkham, great insight here, thanks for helping provide a lot of background info here!

  1. On windows in a Terminal setting, CMD and Windows Terminal, Right click will both copy and paste.
  2. Scroll wheel click leads to issues of unintentional scrolling, no?
  3. what if the user has a trackpad? A trackball?
  4. Is this for terminal or all applications?

    1. if it is all, how would this work in an application like Adobe Photoshop or Illustrator?

  5. what is the scenario for two different clipboards, a ctrl-c and then the highlight copy style one

Or is the underlying ask here, clone X Window clipboard? https://en.m.wikipedia.org/wiki/X_Window_selection#Clipboard

My original ask is exactly a clone of XWindows. Answering your specific questions:

  1. well, this one isn't a question. :)
  2. no, I can't say this has ever been a problem. Though this should probably disable the middle-click mouse movement scrolling behavior.
  3. My trackpad has 3 clickable buttons on it. So does my trackball. And I'm not asking to get rid of Ctrl-V for people who want to keep using that.
  4. All applications. It might not work for graphics elements, but it will work for any application that has text (browser, email, Word, etc.)
  5. I'm actually ok with having the selection buffer be the same as the clipboard, as I had been using a utility called TrueXMouse to get it in Windows, but a recent update to Outlook broke it. But I can appreciate not wanting to clutter clipboard history so I'm totally ok with a more faithful reproduction of how XWindows works.

I’m looking for a reproduction of the XWindows version, using a separate buffer. This wouldn’t affect the existing Ctrl-C/Ctrl-V behavior that everyone is used to, and wouldn’t clutter that traditional clipboard buffer.

I use a trackpad on my laptop and desktop, set (in my terminal app) to use a middle-click for paste (which is mapped to a three finger single tap). I’m not sure I understand the question/concern for non-mouse users.

For me, I’d only need to see this feature work in terminal/cmd and PowerShell.

  1. I commonly copy examples from web pages, so the fact that terminal supports keyboardless copy and paste is only part of the solution
  2. If you use a crappy mouse, yes. But good mice like the Logitech MX Anywhere 2s have dedicated middle click buttons and any good mouse has multiple buttons that can have middle click assigned to them. Additionally, Linux also supports middle click emulation for mice that don't have a middle click button: clicking both the left and the right mouse buttons triggers the same behaviour as middle click.
  3. Trackpads often have a gesture to trigger middle click; trackballs typically have a middle mouse click button.
  4. It is for text in all applications. In X Windows you can highlight any text and it is set to the primary selection (which is distinct from the clipboard, hitting ctrl-c or ctrl-shift-c in a terminal will copy the primary selection to the clipboard) . Middle clicking will paste the primary selection.
  5. The primary ask in my ticket that was marked as dup of this ticket was to clone the X Windows behavior as it is very useful (having a ephemeral text in the primary selection and a second more import chunk of text in the clipboard is a common thing I do)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

21cpDev picture 21cpDev  Â·  3Comments

saahmedm picture saahmedm  Â·  3Comments

Satanarious picture Satanarious  Â·  3Comments

enricogior picture enricogior  Â·  3Comments

Martin-Hausleitner picture Martin-Hausleitner  Â·  3Comments