Created
June 8, 2020 00:27
-
-
Save timhuff/7f1fcc9923989bc880ba26f39065b905 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#SingleInstance force | |
; -------------------------------------------------------------- | |
; NOTES | |
; -------------------------------------------------------------- | |
; ! = ALT | |
; ^ = CTRL | |
; + = SHIFT | |
; # = WIN | |
; screenshot shortcuts | |
<^>^+4::Send +#s | |
PrintScreen::Send +#s | |
;alt-function-delete deletes next word | |
!Delete::Send {LShift down}{LCtrl down}{Right}{Lctrl up}{LShift Up}{Del} | |
;alt-delete deletes previous word | |
!BS::Send {LShift down}{LCtrl down}{Left}{Lctrl up}{LShift Up}{Del} | |
;following section remaps alt-arrow and command-arrow | |
;keys to mimic OSX behaviour | |
!Left::Send ^{Left} | |
!Right::Send ^{Right} | |
+!Left::Send {Shift Down}^{Left}{Shift Up} | |
+!Right::Send {Shift Down}^{Right}{Shift Up} | |
>^Left::Send {Home} | |
>^Right::Send {End} | |
>^Up::Send ^{Home} | |
>^Down::Send ^{End} | |
+>^Left::Send {Shift Down}{Home}{Shift Up} | |
+>^Right::Send {Shift Down}{End}{Shift Up} | |
+>^Up::Send {Shift Down}^{Home}{Shift Up} | |
+>^Down::Send {Shift Down}^{End}{Shift Up} | |
>^Space:: | |
KeyWait, Control | |
Send {LWin} | |
return | |
$>^h::Send #{Down} | |
RCtrl & q::Send {LAlt down}{F4}{LAlt up} | |
; Remap Ctrl-Tab to Alt-Tab | |
^Tab:: | |
Send {Alt down}{Tab} | |
Keywait Control | |
Send {Alt up} | |
return | |
; Remap Ctrl-Shift-Tab to Alt-Shift-Tab | |
^+Tab:: | |
Send {Alt down}{Shift down}{Tab} | |
Keywait Control | |
Send {Alt up} | |
Send {Shift up} | |
return | |
;---------- | |
; Application specific | |
; -------------------------------------------------------------- | |
;Chrome | |
#IfWinActive ahk_class Chrome_WidgetWin_1 | |
$>^y::Send ^h | |
RCtrl & w::Send ^{F4} | |
RCtrl & q::Send !{F4} | |
<^Left::Send !{Left} | |
<^Right::Send !{Right} | |
#IfWinNotActive ahk_class Chrome_WidgetWin_1 | |
RCtrl & w::Send !{F4} | |
#IfWinActive | |
;Windows Explorer | |
#IfWinActive ahk_class CabinetWClass | |
Enter:: | |
Send {F2} | |
sleep, 500 | |
KeyWait, Enter, D | |
Send {Enter} | |
return | |
>^Down:: | |
Send {Blind}{RControl up}{Enter} | |
sleep, 500 | |
return | |
>^+Down::Send {Enter} | |
$>^Up::Send {BS} | |
>^BS::Send {Del} | |
RCtrl & w::Send {LAlt down}{F4}{LAlt up} | |
#IfWinActive ; turn off context sensitivity | |
#IfWinNotActive ahk_class CabinetWClass | |
RCtrl & BS::Send {LShift down}{Home}{LShift up}{Del} | |
#IfWinActive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment