Skip to content

Instantly share code, notes, and snippets.

@thejustinwalsh
Created June 19, 2023 14:38
Show Gist options
  • Save thejustinwalsh/67c7a37a7dd6697606dae3d692dd2099 to your computer and use it in GitHub Desktop.
Save thejustinwalsh/67c7a37a7dd6697606dae3d692dd2099 to your computer and use it in GitHub Desktop.
An attempt at AutoHotKey Mac keybinds for when remoting into a Windows box using Parsec from a Mac.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; You need to disable "Windows + X hotkeys" in the Group Policy Editor
; https://answers.microsoft.com/en-us/windows/forum/all/disable-windows-10-keyboard-shortcuts/8048c2bb-ceeb-4aa0-a3aa-e1ede2534209
; Media Keys
$F7::Send {Media_Prev}
$F8::Send {Media_Play_Pause}
$F9::Send {Media_Next}
$F10::Send {Volume_Mute}
$F11::Send {Volume_Down}
$F12::Send {Volume_Up}
; Print Screen
$F13::Send {PrintScreen}
$!F13::Send !{PrintScreen}
; Pause/Break
$F15::Send {CtrlBreak}
; Remap Function Keys to require shift
$+F7::Send {F7}
$+F8::Send {F8}
$+F9::Send {F9}
$+F10::Send {F10}
$+F11::Send {F11}
$+F12::Send {F12}
; Universal shotcuts
$#x::Send ^x
$#c::Send ^c
$#v::Send ^v
$#s::Send ^s
$#+s::Send ^+s
$#w::Send ^w
$#f::Send ^f
$#+f::Send ^+f
$#n::Send ^n
$#+n::Send ^+n
$#o::Send ^o
$#q::Send !{f4}
$#r::Send ^{f5}
$#t::Send ^t
$#+t::Send ^+t
$#=::Send ^{+}
$#-::Send ^-
$#b::Send ^+b
$#a::
Send {Blind}{Ctrl Down}{a DownR}
return
$#a up::
Send {Blind}{Ctrl Up}{a Up}
return
$#z::
Send {Blind}{Ctrl Down}{z DownR}
return
$#z up::
Send {Blind}{Ctrl Up}{z Up}
return
$#+z::
Send {Blind}{Ctrl Down}{Shift Down}{y DownR}
return
$#+z up::
Send {Blind}{Ctrl Up}{Shift Up}{y Up}
return
; Text Navigation (Chainable without KeyDelay in Parsec)
;-----------------
$<#Right::
Send {Blind}{End DownR}
return
$<#Right up::
Send {Blind}{End Up}
return
$<#+Right::
Send {Blind}{Shift Down}{End DownR}
return
$<#+Right up::
Send {Blind}{Shift Up}{End Up}
return
$<#Left::
Send {Blind}{Home DownR}
return
$<#Left up::
Send {Blind}{Home Up}
return
$<#+Left::
Send {Blind}{Shift Down}{Home DownR}
return
$<#+Left up::
Send {Blind}{Shift Up}{Home Up}
return
$<#Up::
Send {Blind}{PgUp DownR}
return
$<#Up up::
Send {Blind}{PgUp Up}
return
$<#+Up::
Send {Blind}{Shift Down}{PgUp DownR}
return
$<#+Up up::
Send {Blind}{Shift Up}{PgUp Up}
return
$<#Down::
Send {Blind}{PgDn DownR}
return
$<#Down up::
Send {Blind}{PgDn Up}
return
$<#+Down::
Send {Blind}{Shift Down}{PgDn DownR}
return
$<#+Down up::
Send {Blind}{Shift Up}{PgDn Up}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment