Skip to content

Instantly share code, notes, and snippets.

@DaleMatthews
Created January 15, 2017 05:39
Show Gist options
  • Save DaleMatthews/13ab2289d7211cac8c4b2057ca56656a to your computer and use it in GitHub Desktop.
Save DaleMatthews/13ab2289d7211cac8c4b2057ca56656a to your computer and use it in GitHub Desktop.
AutoHotKey Caps Lock ijkl arrow keys
#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.
Alt::Ctrl
Ctrl::Alt
CapsLock::Send {Esc}
CapsLock & i::
If GetKeyState("Shift", "P")
send +{up}
Else
send {up}
return
CapsLock & j::
If GetKeyState("Shift", "P")
send +{left}
Else
send {left}
return
CapsLock & k::
If GetKeyState("Shift", "P")
send +{down}
Else
send {down}
return
CapsLock & l::
If GetKeyState("Shift", "P")
send +{right}
Else
send {right}
return
CapsLock & h::
If GetKeyState("Shift", "P")
send +{home}
Else
send {home}
return
CapsLock & n::
If GetKeyState("Shift", "P")
send +{end}
Else
send {end}
return
CapsLock & u::
If GetKeyState("Shift", "P")
send +{PgUp}
Else
send {PgUp}
return
CapsLock & o::
If GetKeyState("Shift", "P")
send +{PgDn}
Else
send {PgDn}
return
CapsLock & '::
If GetKeyState("Shift", "P")
send +{delete}
Else
send {delete}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment