Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Turn CAPS LOCK into CaPs LoCK.
Random, upper, 0, 1
ToggleCase(c) {
global upper := !upper
if upper {
StringUpper, c, c
} else {
StringLower, c, c
return c
Studly() {
c := A_ThisHotKey
if GetKeyState("CapsLock", "T") {
c := ToggleCase(c)
SendInput % c
; Make hotkeys for all ASCII letters.
alpha := "abcdefghijklmnopqrstuvwxyz"
#UseHook on
Loop, parse, alpha
Hotkey % A_LoopField, Studly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment