Keyboard Shortcuts AutoHotkey Basics
AutoHotkey is a free, open-source scripting tool for Windows that lets you create custom keyboard shortcuts, automate repetitive tasks, remap keys, and type long text blocks with just a few keystrokes. It is the most powerful shortcut customization tool available for Windows without writing complex code.
What AutoHotkey Can Do
✔ Create any key combination → any action ✔ Type a long phrase by pressing 3 keys ✔ Remap any key to any other key ✔ Automate mouse clicks and movements ✔ Open apps, files, and websites with a shortcut ✔ Fill out forms automatically ✔ Run programs and scripts with a hotkey
Installing AutoHotkey
1. Go to autohotkey.com
2. Download AutoHotkey v2 (current version)
3. Run the installer → follow prompts
4. AutoHotkey is now installed — no visible app icon appears
(it runs scripts in the background when launched)
Creating Your First Script
1. Right-click on the Desktop
2. New → AutoHotkey Script
3. Name it (e.g., "MyShortcuts.ahk")
4. Right-click the new .ahk file → Edit
5. The script opens in Notepad
6. Write your shortcuts (examples below)
7. Save the file
8. Double-click the .ahk file → AutoHotkey runs the script
(a green "H" icon appears in the system tray)
AutoHotkey Syntax — The Basics
HOTKEY SYNTAX:
[modifier][key]::
action
return
MODIFIER SYMBOLS:
^ = Ctrl
! = Alt
+ = Shift
# = Windows key
* = any modifier (wildcard)
EXAMPLES:
^j:: ; Ctrl + J
Run "notepad.exe"
return
!F1:: ; Alt + F1
Run "https://google.com"
return
#e:: ; Win + E (overrides default File Explorer)
Run "C:\Projects"
return
Text Expansion with AutoHotkey
Text expansion lets you type a short abbreviation and have it automatically replaced with a longer phrase or block of text.
SYNTAX: ::abbreviation::replacement text EXAMPLES: ::addr::123 Main Street, New York, NY 10001 ::eml::john.smith@company.com ::sig::Best regards,`nJohn Smith`nSenior Analyst ::mtg::I'd like to schedule a meeting at your convenience. ::ty::Thank you for reaching out. I will get back to you shortly. HOW IT WORKS: Type "addr" → press Space or Enter → expands to full address Type "eml" → press Space → replaces with full email address Type "sig" → press Space → types your full email signature The backtick n (`n) inserts a new line in the replacement.
Key Remapping
SYNTAX: OriginalKey::NewKey EXAMPLES: CapsLock::Esc ; Caps Lock now acts as Escape F12::Calculator ; F12 opens Calculator (using app name) RCtrl::AppsKey ; Right Ctrl becomes right-click key SWAP TWO KEYS: a::b ; A now types B b::a ; B now types A (Both lines needed to swap completely)
Running Scripts Automatically at Startup
To run your AutoHotkey script every time Windows starts: METHOD 1 — Startup Folder: Win + R → type "shell:startup" → Enter → Paste a SHORTCUT to your .ahk file in this folder → The script runs automatically when you log in METHOD 2 — Task Scheduler: Win → "Task Scheduler" → Create Basic Task → Trigger: "When I log on" → Action: Start a program → browse to your .ahk file
Managing Running Scripts
SYSTEM TRAY (bottom-right of taskbar): Green "H" icon = AutoHotkey script is running RIGHT-CLICK the tray icon: ✔ Pause Script → temporarily stop all hotkeys ✔ Suspend Hotkeys → disable all hotkeys (useful in games) ✔ Reload Script → re-read the .ahk file after edits ✔ Edit Script → open the script file in Notepad ✔ Exit → stop the script completely
Practical Starter Script
; ===== MY SHORTCUTS — MyShortcuts.ahk ===== ; Text Expansions ::addr::123 Business Park, Suite 400, Chicago, IL 60601 ::ph::+1 (312) 555-0199 ::eml::myname@company.com ::ty::Thank you for your message. I will respond shortly. ; App Launchers ^!n::Run "notepad.exe" ; Ctrl+Alt+N opens Notepad ^!c::Run "calc.exe" ; Ctrl+Alt+C opens Calculator ^!e::Run "C:\Users\Me\Documents"; Ctrl+Alt+E opens Documents ; Key Remaps CapsLock::Esc ; Caps Lock = Escape ; ===== END =====
Quick Reference
SYMBOL MODIFIER KEY EXAMPLE ────────────────────────────────────────────────── ^ Ctrl ^a = Ctrl + A ! Alt !a = Alt + A + Shift +a = Shift + A # Win #e = Win + E :: Hotstring start ::abbr::full text Run Open app/URL Run "notepad.exe" `n New line in text expansions TRAY ICON ACTIONS: Right-click H icon → Reload (after saving edits) Right-click H icon → Suspend (disable all hotkeys)
AutoHotkey's text expansion feature alone justifies the small time investment of learning its syntax. Typing your full email address, phone number, or standard reply dozens of times per day takes real time — replacing each of those with a three-letter abbreviation that expands instantly saves hours per week for anyone who communicates frequently by email or chat.
