Skip to content

Instantly share code, notes, and snippets.

@hwayne
Created March 5, 2021 22:25
Show Gist options
  • Save hwayne/14f77111217f96ac2d5b947c472aa0e1 to your computer and use it in GitHub Desktop.
Save hwayne/14f77111217f96ac2d5b947c472aa0e1 to your computer and use it in GitHub Desktop.
AHK Tomfoolery
; NOTE: might not work out of the box, I'm assembling this from several different files
g_mode := ""
set_mode(new_mode) {
global g_mode
if (g_mode = new_mode) {
g_mode := ""
}
else {
g_mode := new_mode
}
TrayTip,, Mode: %g_mode%, 20, 17
return
}
NumpadSub::set_mode("subscripts")
#If (g_mode != "subscripts")
>^0:: Send, ⁰
>^1:: Send, ¹
>^2:: Send, ²
>^3:: Send, ³
>^4:: Send, ⁴
>^5:: Send, ⁵
>^-:: Send, ⁻
>^+:: Send, ⁺
>^n:: Send, ⁿ
#If (g_mode = "subscripts")
>^0:: Send, ₀
>^1:: Send, ₁
>^2:: Send, ₂
>^3:: Send, ₃
>^4:: Send, ₄
>^5:: Send, ₅
>^-:: Send, ₋
>^+:: Send, ₊
>^m:: Send, ₘ
>^n:: Send, ₙ
#If
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment