documents/keyboards/AutoHotkey.md

AutoHotkey

See tutorial page

Basic Script

^j::
    Send, My First Script
Return
  • The first line. ^j:: is the Hotkey. ^ means CTRL, j is the letter j. Anything to the left of :: are the keys you need to press.
  • The second line. Send, My First Script is how you SEND keystrokes. SEND is the command, anything after the comma (,) will be typed.
  • The third line. Return. Return will become your best friend. It literally STOPS code from going any further, to the lines below. This will prevent many issues when you start having a lot of stuff in your scripts.

Example Alt+w sends Ctrl+w

!w::
  Send, ^w
Return

Commands

Command Desc Example
Send Sends simulated keystrokes and mouse clicks to the active window. Send, My First Script
Run runs an external program Run, notepad.exe
MsgBox Displays the specified text in a small window containing one or more buttons (such as Yes and No). MsgBox, Text

Special Keys

Hotkeys Page KeyList Page

symbol Description
# Windows key
! Alt
^ Control
+ Shift
& used between two keys or mouse buttons to combine