Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
; Copied from http://www.autohotkey.com/board/topic/10412-paste-plain-text-and-copycut/
#v:: ; Text–only paste from ClipBoard | WIN and V keys are the hotkey
KeyWait, LWin ; Wait for the Windows key to be lifted,
KeyWait, RWin ; since it would sometimes combine with the pasted text.
OldClip = %ClipBoardAll% ; Save formatted text for later
ClipBoard = %ClipBoard% ; Convert to text
Send ^v ; For best compatibility: SendPlay | simulates pressing CRTL and V keys
Sleep 50 ; Don't change clipboard while it is pasted! (Sleep > 0)
ClipBoard = %OldClip% ; Restore original ClipBoard
VarSetCapacity(OldClip, 0) ; Free memory
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment