I'm using AHK and my main goal is to make my middle mouse button to function as it normally would if I pressed it once, but would trigger "Ctrl + C" or copy if I pressed and held it for 500ms and paste what is copied or "Ctrl + v" if I kept on pressing for 1000ms
I have searched the internet for a week but couldn't find a solution (maybe its because I'm new to this) but here's some codes I found that I believe would get it done but for some reason I couldn't get it to work.
Here's the code I found
The original codeand I have tried to modify some of it and here it is
I apologize for posting as image, as you can see below the indentation doesn't look clean
RCtrl:: keyDown := A_TickCountWhile GetKeyState("RCtrl", "P") Send {Ctrl Down} duration := A_TickCount - keyDown Send {Ctrl Up} if duration < 300 Send {Enter} Return