From 9608ef95ae3db3833b9971246406d9a11d60d811 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sun, 5 Apr 2020 17:04:08 -0500 Subject: [PATCH] - Added ConEmu/Cmder, mintty, and powershell support --- windows/kinto.ahk | 67 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 5 deletions(-) diff --git a/windows/kinto.ahk b/windows/kinto.ahk index ad881f0..8b5d42d 100644 --- a/windows/kinto.ahk +++ b/windows/kinto.ahk @@ -1,4 +1,15 @@ GroupAdd, terminals, ahk_exe ubuntu.exe +GroupAdd, terminals, ahk_exe ConEmu.exe +GroupAdd, terminals, ahk_exe ConEmu64.exe +GroupAdd, terminals, ahk_exe powershell.exe + +GroupAdd, posix, ahk_exe ubuntu.exe +GroupAdd, posix, ahk_exe ConEmu.exe +GroupAdd, posix, ahk_exe ConEmu64.exe +GroupAdd, posix, ahk_exe mintty.exe + +GroupAdd, ConEmu, ahk_exe ConEmu.exe +GroupAdd, ConEmu, ahk_exe ConEmu64.exe GroupAdd, editors, ahk_exe sublime_text.exe @@ -47,22 +58,68 @@ $^+Right::Send +{End} #If #IfWinActive ahk_group terminals + ; Copy ^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up} #c::Send {LCtrl down}c{LCtrl Up} +#If + +#IfWinActive ahk_group posix + ; End of Line + #e::Send {LCtrl down}e{LCtrl Up} + ^e::return + ; Beginning of Line + #a::Send {LCtrl down}a{LCtrl Up} + ^a::return + ;^l::Send clear{Enter} + ;#l::return + ; Clear Terminal and Scroll Buffer + ^k::Send clear && printf '\e[3J'{Enter} + ; Nano editor shortcuts + #k::Send {LCtrl down}k{LCtrl Up} #x::Send {LCtrl down}x{LCtrl Up} #o::Send {LCtrl down}o{LCtrl Up} #r::Send {LCtrl down}r{LCtrl Up} #w::Send {LCtrl down}w{LCtrl Up} #\::Send {LCtrl down}\{LCtrl Up} - #k::Send {LCtrl down}k{LCtrl Up} #u::Send {LCtrl down}u{LCtrl Up} #j::Send {LCtrl down}j{LCtrl Up} #t::Send {LCtrl down}t{LCtrl Up} #_::Send {LCtrl down}_{LCtrl Up} +#If + +#IfWinActive ahk_group ConEmu + ; Paste + $^v::Send {Shift down}{Insert}{Shift Up} + #v::^v +#If + +#IfWinActive ahk_exe mintty.exe + ; Copy + $^c::Send {Control down}{Insert}{Control Up} + #c::Send {LCtrl down}c{LCtrl Up} + ; Paste + $^v::Send {Shift down}{Insert}{Shift Up} + #v::Send {LCtrl down}v{LCtrl Up} +#If + +#IfWinActive ahk_exe ubuntu.exe + ; Paste ^v::Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up} #If -#IfWinActive ahk_exe powershell.exe - ^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up} - #c::Send {LCtrl down}c{LCtrl Up} -#If \ No newline at end of file +;Disable win + l key locking (This line must come before any hotkey assignments in the .ahk file) + +; Admin privileges required +; Sets Workstation Lock to not occur on Win+L +; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 1 + +; Re-enables Workstation lock on Ctrl+Cmd+Q +; Need to Remove Quick Assist and reboot +; Remove-WindowsCapability -online -name App.Support.QuickAssist~~~~0.0.1.0 +#^q:: +; re-enable locking workstation, then lock it +; RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 0 +; DllCall("LockWorkStation") +; Reload script to relock Workstation Lock +; Reload +;return \ No newline at end of file