; -------------------------------------------------------------- ; NOTES ; -------------------------------------------------------------- ; ! = ALT ; ^ = CTRL ; + = SHIFT ; # = WIN ; #InstallKeybdHook #SingleInstance force SetTitleMatchMode 2 SendMode Input ; -------------------------------------------------------------- ; OS X system shortcuts ; -------------------------------------------------------------- ; Make Ctrl + S work with cmd (windows) key ; #s::^s ;; Win+S, with above, will be interpreted as Win+Ctrl+S and show the ;; speech recognition dialog. #s:: sendinput ^s return ; Selecting #a::Send, ^a ; Copying #c::Send, ^c ; Pasting #v::Send, ^v ; Cutting #x::Send, ^x ; Opening #o::^o ; Finding #f::Send ^f ; Undo #z::^z ; Redo #y::^y ; New tab #t::^t ; close tab #w::^w ; Close windows (cmd + q to Alt + F4) #q::Send !{F4} ; Remap Windows + Tab to Alt + Tab. Lwin & Tab::AltTab ; minimize windows #m::WinMinimize,a ; -------------------------------------------------------------- ; -------------------------------------------------------------- ; Reload this script LWin & F12::Reload ; Support Mac-style superlative cursoring while holding shift, so we can select ;LWin & LShift & Up::Send {PgUp} +<#Up::Send +{PgUp} +<#Down::Send +{PgDn} +<#Left::Send +{Home} +<#Right::Send +{End} ; Mac-style superlative cursoring <#Up::Send {PgUp} <#Down::Send {PgDn} <#Left::Send {Home} <#Right::Send {End} ; Suppress LWin for start menu popup. (It's annoying.) ; RWin still works. LWin:: ; -------------------------------------------------------------- ; Application specific ; -------------------------------------------------------------- ;; Google Chrome ;#IfWinActive, ahk_class Chrome_WidgetWin_1 ;; Show Web Developer Tools with cmd + alt + i ;#!i::Send {F12} ;; Show source code with cmd + alt + u ;#!u::Send ^u ;#IfWinActive ;; Find window classes ;;#1::WinGetClass, Clipboard, A ; Will copy the ahk_class of the Active Window to clipboard ;; Microsoft Terminal ; Annoyingly, if nothing is selected, MT will send Ctrl+C when Ctrl+Shift+C is pressed. :( #IfWinActive, ahk_class CASCADIA_HOSTING_WINDOW_CLASS ; Copying #c::Send, +^c ; Pasting #v::Send, +^v ; Cutting #x::Send, ^+x #IfWinActive ;; Firefox ;; LWin+L in Firefox should go to address bar; RWin+L still locks ;#LWin & L::X #IfWinActive, ahk_class MozillaWindowClass #d::^d #IfWinActive