Skip to content

Instantly share code, notes, and snippets.

@toyg
Last active June 22, 2020 08:58
Show Gist options
  • Save toyg/35f08f85ca5cc98341ac32f2cb2e7fb4 to your computer and use it in GitHub Desktop.
Save toyg/35f08f85ca5cc98341ac32f2cb2e7fb4 to your computer and use it in GitHub Desktop.
Autohotkey script to turn CapsLock in a new independent meta key for special characters. Assumes a Qwerty layout underneath.
#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.
SetCapsLockState AlwaysOff
; left hand , top row
CapsLock & q::
Send £
return
CapsLock & w::
Send &
return
CapsLock & e::
Send *
return
CapsLock & r::
Send ~
return
CapsLock & t::
Send `:
return
; left hand, home row
CapsLock & a::
Send {RAlt}``
return
CapsLock & s::
Send {#}
return
CapsLock & d::
Send @
return
CapsLock & f::
Send $
return
CapsLock & g::
Send `%
return
; left hand, bottom row
CapsLock & c::
Send {^}
return
CapsLock & v::
Send ``
return
CapsLock & b::
Send `;
return
; right hand, top row
CapsLock & y::
Send `-
return
CapsLock & u::
Send )
return
CapsLock & i::
Send ]
return
CapsLock & o::
Send {}}
return
CapsLock & p::
Send >
return
; right hand, home row
CapsLock & h::
Send _
return
CapsLock & j::
Send (
return
CapsLock & k::
Send [
return
CapsLock & l::
Send {{}
return
CapsLock & `;::
Send <
return
; right hand, bottom row
CapsLock & n:
Send {=}
return
CapsLock & m::
Send {+}
return
CapsLock & ,::
Send `\
return
CapsLock & .::
Send `|
return
CapsLock & /::
Send {!}
return
; NUMPAD
; right hand, top row
#if GetKeyState("CapsLock", "P")
Shift & u::
Send 1
return
Shift & i::
Send 2
return
Shift & o::
Send 3
return
; right hand, home row
Shift & j::
Send 4
return
Shift & k::
Send 5
return
Shift & l::
Send 6
return
; right hand, bottom row
Shift & m::
Send 7
return
Shift & ,::
Send 8
return
Shift & .::
Send 9
return
Shift & /::
Send 0
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment