Skip to content

Instantly share code, notes, and snippets.

@lrytz
Created Oct 20, 2021
Embed
What would you like to do?
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases
#Warn ; Enable warnings to assist with detecting common errors
#UseHook ; Maybe more efficient? Prevents hotkey X to fire on Send {X}
SendMode Input ; Recommended for new scripts due to its superior speed and reliability
; Notes
; X::Y forwards modifiers, X::Send {Y} doesn't
; todo: alt emacs
; LWin -> F14 by SharpKeys
SetWorkingDir %A_ScriptDir%
SetCapslockState, AlwaysOff
; https://stackoverflow.com/questions/62255619/how-do-you-remap-alttab-in-autohotkey
F14 & Tab::AltTab
; win hotkeys a la mac
F14 & a::Send, {Blind}^{a}
F14 & b::Send, {Blind}^{b}
F14 & c::Send ^{c}
F14 & d::Send #{d}
F14 & e::Send #{e}
F14 & f::Send, {Blind}^{f}
F14 & g::Send, {Blind}^{g}
F14 & h::Send, {Blind}^{h}
F14 & i::Send, {Blind}^{i}
F14 & j::Send, {Blind}^{j}
F14 & k::Send, {Blind}^{k}
F14 & l::Send, {Blind}^{l}
F14 & m::Send, {Blind}^{m}
F14 & n::Send, {Blind}^{n}
F14 & o::Send, {Blind}^{o}
F14 & p::Send, {Blind}^{p}
F14 & q::Send !{F4}
F14 & r::Send, {Blind}^{r}
F14 & s::Send, {Blind}^{s}
F14 & t::Send, {Blind}^{t}
F14 & u::Send, {Blind}^{u}
F14 & v::Send, {Blind}^{v}
F14 & w::Send, {Blind}^{w}
F14 & x::Send, {Blind}^{x}
F14 & y::Send, {Blind}^{y}
F14 & z::Send, {Blind}^{z}
F14 & 1::Send ^{PgUp}
F14 & 2::Send ^{PgDn}
+F14::LWin
; navigation a la emacs
#IfWinNotActive ahk_exe csgo.exe
^a::Send {Home}
^b::Send {Left}
^d::Send {Del}
^e::Send {End}
^f::Send {Right}
^h::Send {BackSpace}
^n::Send {Down}
^p::Send {Up}
!b::Send ^{Left}
!d::Send ^{Del}
!f::Send ^{Right}
!h::Send ^{BackSpace}
#if
; hyper
; https://stackoverflow.com/questions/40435980/how-to-emulate-hyper-key-in-windows-10-using-autohotkey
~Capslock::
Send {Ctrl DownTemp}{Shift DownTemp}{Alt DownTemp}
KeyWait, Capslock
Send {Ctrl Up}{Shift Up}{Alt Up}{LWin Up}
if (A_PriorKey = "Capslock") {
Send {Esc}
}
return
;; ~Capslock & h:: Send {a}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment