- Fixes copy/paste for cmd/mintty in Win10

This commit is contained in:
Ben Reaves
2020-09-29 04:06:28 -05:00
parent 7fe35cdec3
commit d642966ba8

View File

@@ -111,6 +111,9 @@ GroupAdd, ConEmu, ahk_exe ConEmu.exe
GroupAdd, ConEmu, ahk_exe ConEmu64.exe GroupAdd, ConEmu, ahk_exe ConEmu64.exe
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
GroupAdd, ExcPaste, ahk_exe Cmd.exe
GroupAdd, ExcPaste, ahk_exe mintty.exe
GroupAdd, editors, ahk_exe sublime_text.exe GroupAdd, editors, ahk_exe sublime_text.exe
GroupAdd, editors, ahk_exe VSCodium.exe GroupAdd, editors, ahk_exe VSCodium.exe
GroupAdd, editors, ahk_exe Code.exe GroupAdd, editors, ahk_exe Code.exe
@@ -446,31 +449,45 @@ GroupAdd, intellij, ahk_exe idea64.exe
#IfWinActive ahk_group terminals #IfWinActive ahk_group terminals
; End of Line ; End of Line
#e:: #e:: ; Default
; !e:: ; CB/IBM
Send {End} Send {End}
return return
; Beginning of Line ; Beginning of Line
#a:: #a:: ; Default
; !a:: ; CB/IBM
Send {Home} Send {Home}
return return
; Copy ; Copy
^c:: ^c::
SetKeyDelay -1 If WinActive("ahk_exe cmd.exe"){
Send {Blind}{LShift down}{c DownTemp} Send {Enter}
}
else if WinActive("ahk_exe mintty.exe"){
SetKeyDelay -1
Send {Blind}{Insert}
}
else{
SetKeyDelay -1
Send {Blind}{LShift down}{c DownTemp}
}
return return
^c up:: ^c up::
SetKeyDelay -1 If not WinActive("ahk_group cmd.exe"){
Send {Blind}{c Up}{LShift Up} SetKeyDelay -1
Send {Blind}{c Up}{LShift Up}
}
return return
; Sigints - interrupt ; Sigints - interrupt
$#c::Send {Ctrl down}c{Ctrl up} $#c::Send {Ctrl down}c{Ctrl up} ; Default
; $!c::Send {Ctrl down}c{Ctrl up} ; CB/IBM
; Paste ; Paste
^v:: $^v::
If WinActive("ahk_exe mintty.exe"){ If WinActive("ahk_exe mintty.exe"){
Send {Shift down}{Insert}{Shift up} Send {Shift down}{Insert}{Shift up}
} }