Is there any application to mimic the "Select to Copy and Middle Click to Paste" behaviour in Windows? I was hoping to find an AutoHotkey script for this, but I couldn't. Maybe someone here could quickly hack one for this :).
4 Answers
Well, there's the True X-Mouse Gizmo, if that works in your Windows version (it's a bit dated).
-
-
1
-
1Works under Win 10, it uses the main clipboard, but : you need to select all the way, a double-click on a word to select it won't copy it ; it kills middle-click to open in a new tab ; it pastes in the textbox which has the focus, not the one under your cursor (you need an extra click to give focus).– lolesqueDec 3, 2020 at 21:19
-
If you're looking for an AutoHotkey script, this one should probably do!
Here's an implementation for copy on select. You can simply select some text and it is copied immediately without having to press ctrl+c.
Conveinent middle button paste is also provided, but with a twist. Middlebutton is useful in browsers, so there is a short time (configurable) while you can paste with the middle button after copy, before original middleclick functionality is restored.
Also, if you click with the right button it cancels middlebutton paste.
Since after selection you usually click with the left button to the place where you want to paste, so that you put the focus there, it is done automatically when using middlebutton pasting.
clipx integration is also added to Ctrl+middlebutton.
I've been using the script for a few days and it's quite convenient. Sometimes the copy tooltip appears unwantedly when something is dragged, but it doesn't cause any problems.
-
This works great, especially if you only want copy on select. True X-Mouse Gizmo will make the middle click useless which is pretty annoying if you used to open new tab with middle click. Jan 31, 2011 at 3:14
-
3the script has been updated later on: autohotkey.com/forum/… Nov 16, 2011 at 11:40
-
-
1However good the mouse dragging idea sounds, I prefer just double-clicking the word to copy it. The reason I started looking for this sort of 'highlight-copy-paste' solution is that addons and extensions make my browser slower. So, I decided to find a desktop app. The Autocopy 2 on Firefox works exactly as I like: 1) double click the word and it gets automatically copied. 2) ctrl+v OR RMouse button + Paste. The solution with Autohotkey and the script seems good, however after that simple functionality in Firefox I understood what simple and easy means. Maybe, somebody could rewrite it? Sep 19, 2017 at 17:03
Check out AutoClipX.
AutoClipX is a highly configurable program that automatically copies selected objects to the Windows clipboard like text, files and folders. Quickly paste what you have copied by clicking a mouse button! AutoClipX runs quietly in the system tray while you work as usual.
-
4It helps to explain why this is a solution, rather than just linking to one.– zackrspvFeb 1, 2012 at 22:10
-
1
SetWinDelay,2
CoordMode,Mouse
return
~MButton::
sleep 100
Send, ^v
return
~LButton::
MouseGetPos x0, y0
Loop
{
Sleep 20
GetKeyState keystate, LButton
IfEqual keystate, U, {
MouseGetPos x, y
break
}
}
if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5)
{
Send ^c
}
if (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < DllCall("GetDoubleClickTime"))
Send ^c
if (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < DllCall("GetDoubleClickTime"))
doubleclick := true
return
#If doubleclick
~LButton::
doubleclick := false
if (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < DllCall("GetDoubleClickTime"))
{
Send, ^c
}
return
-
2Welcome to Super User! Generally, answers are much more helpful if they include an explanation of what the code is intended to do, and why that solves the problem without introducing others.– MMMFeb 14, 2020 at 15:00