Various behavior changes that work better for me
Only paste on middle button press ie, ignore side buttons like forward/back
Also don't paste unless the cursor is an ibeam, aka is hovering over a text field. Should let the middle button work for eg browser links in new tab hopefully
Only copy on drag if we've dragged more than 5 px away Prevent spurious copys on click while moving the mouse slightly
Don't copy on double click Only copy when dragging to highlight, to make the highlight -> double click -> paste use case more useful
~~Copy on triple click Instead of copy on double click, do copy on triple click because that's unlikely to be followed by an immediate paste, but does highlight eg browser url bar which is usually worth a copy.~~
Manage a separate paste buffer for middle click When we copy, save the current clipboard prior to copying, then when we notice the clipboard change, store that clipboard in a separate pasteItems and restore the old clipboard. When we paste via middle button, set the clipboard to the stored pasteItems, and when we can set the clipboard back to the saved current clipboard. Because of that, restore copy-on-double-click behavior, as the typical patterns work well with a separate clipboard and selection buffer. There's still a little bit of a race if you select/paste too fast though?
Not sure but the repo looks zombie. I would like to follow more in your own repo. Keep us updated.
Working fine to me. Thank you. Sonoma M2
To use with my macbook trackpad I use it together with https://github.com/artginzburg/MiddleClick-Sonoma
Can you run the copy action when there is text to copy? The Force Touch is running all the time with nothing to copy 😢
Of course, if possible using its own clipboard would make it a masterpiece because sometimes as dev I copy something and select another to delete then paste. But I paste exactly what I deleted. 🫠
not sure what you mean about Force Touch, but certainly possible i messed something up with that last commit. i see the copy working pretty much how I want it to at this point, but could be missing something.
the paste what i want to overwrite problem is a bad one for sure, not sure if something like flycut running in conjunction with this would be a decent solution?
I just want to disable the copy on force click at trackpad, IDK why but when I force click (real click on trackpad) it acts like middle click....
UPDATE: I pulled your last update from this PR and now it pastes twice 😭
Why triple click is important if double will already select?
its my attempt to avoid the "as dev I copy something and select another to delete then paste. But I paste exactly what I deleted" problem -- I usually double click to select a variable to paste over, so don't want that double click to copy. but my browser does a triple click to select the full URL, so do want that to copy. YMMV
I’m not the owner but thank you for this great changes. By not messing with the main clipboard is such an amazing change. Ever.
~~Just tested, not sure if I understood but the clipboard keeps the same, one single buffer :/~~
MY ERROR: not checked out only-center-button-press branch.
For now looks amazing!
@josephlbarnett I usually take screenshots with main button (right click drag then release) but are being blocked by the macpaste, so the image does not go to the clipboard, keeps the previous text.
After two days I need to say that this is almost stable, thanks again!
haha yes, almost stable indeed -- seems like some amount of highlight, pause and move mouse, command+c copy, pause and move mouse, ok go ahead and work normal works most of the time, but the race condition there is a little maddening. not sure about the screenshot workflow or if I can do anything to avoid the blockage (at this point it shouldn't affect any right clicks, just left and middle clicks).
@josephlbarnett the problem is not about taking screenshots itself but the act of click drag to the area then drop. The macpaste probably understands as a selection drag and drop.
@josephlbarnett Great work, I'm using your fork and I'm super pleased with the behaviour. It's sad that project is stale and this couldn't reach broader audience.