Last active
August 29, 2015 14:22
-
-
Save Lokno/e04a4ef89141727c5607 to your computer and use it in GitHub Desktop.
Extends ctrl+c and ctrl+v copy/paste shortcuts to terminals
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
; Enables ctrl+c and ctrl+v for command line terminals | |
; Escape is used in the place of the ctrl+c interrupt | |
$^c:: | |
if WinActive("ahk_class ConsoleWindowClass") or WinActive("ahk_class PuTTY") | |
{ | |
SendInput {Enter} | |
} | |
else | |
{ | |
SendInput ^c | |
} | |
return | |
$^v:: | |
if WinActive("ahk_class ConsoleWindowClass") or WinActive("ahk_class PuTTY") | |
{ | |
SendInput {RButton} | |
} | |
else | |
{ | |
SendInput ^v | |
} | |
return | |
$Esc:: | |
if WinActive("ahk_class ConsoleWindowClass") or WinActive("ahk_class PuTTY") | |
{ | |
SendInput ^c | |
} | |
else | |
{ | |
SendInput {Esc} | |
} | |
return | |
; BONUS : uncomment to ignore ctrl+s in terminals | |
; $^s:: | |
; if !WinActive("ahk_class ConsoleWindowClass") and !WinActive("ahk_class PuTTY") | |
; { | |
; SendInput ^s | |
; } | |
; return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment