From d642966ba89cd96397a525179fc56a4862d361b4 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Tue, 29 Sep 2020 04:06:28 -0500 Subject: [PATCH] - Fixes copy/paste for cmd/mintty in Win10 --- windows/kinto.ahk | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index f8fc3e1..4323359 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -111,6 +111,9 @@ GroupAdd, ConEmu, ahk_exe ConEmu.exe GroupAdd, ConEmu, ahk_exe ConEmu64.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 VSCodium.exe GroupAdd, editors, ahk_exe Code.exe @@ -446,31 +449,45 @@ GroupAdd, intellij, ahk_exe idea64.exe #IfWinActive ahk_group terminals ; End of Line - #e:: + #e:: ; Default + ; !e:: ; CB/IBM Send {End} return ; Beginning of Line - #a:: + #a:: ; Default + ; !a:: ; CB/IBM Send {Home} return ; Copy ^c:: - SetKeyDelay -1 - Send {Blind}{LShift down}{c DownTemp} + If WinActive("ahk_exe cmd.exe"){ + Send {Enter} + } + else if WinActive("ahk_exe mintty.exe"){ + SetKeyDelay -1 + Send {Blind}{Insert} + } + else{ + SetKeyDelay -1 + Send {Blind}{LShift down}{c DownTemp} + } return ^c up:: - SetKeyDelay -1 - Send {Blind}{c Up}{LShift Up} + If not WinActive("ahk_group cmd.exe"){ + SetKeyDelay -1 + Send {Blind}{c Up}{LShift Up} + } return ; 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 - ^v:: + $^v:: If WinActive("ahk_exe mintty.exe"){ Send {Shift down}{Insert}{Shift up} }