-
-
Save neoOpus/baa863068707409102882405bf6a9c45 to your computer and use it in GitHub Desktop.
Toggle Double-Click to Copy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Suspend, on | |
; Example #4: Detects when a key has been double-pressed (similar to double-click). | |
; KeyWait is used to stop the keyboard's auto-repeat feature from creating an unwanted | |
; double-press when you hold down the RControl key to modify another key. It does this by | |
; keeping the hotkey's thread running, which blocks the auto-repeats by relying upon | |
; #MaxThreadsPerHotkey being at its default setting of 1. | |
; Note: There is a more elaborate script to distinguish between single, double, and | |
; triple-presses at the bottom of the SetTimer page. | |
~LButton:: | |
if (A_PriorHotkey <> "~LButton" or A_TimeSincePriorHotkey > 400) | |
{ | |
; Too much time between presses, so this isn't a MsgBox You typed "btw"-press. | |
KeyWait, LButton | |
return | |
} | |
Send, ^c | |
return | |
~$Insert::Suspend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment