2010-04-28

AutoHotKey Key Notations

Perm url with updates: http://xahlee.org/mswin/autohotkey_key_notations.html

AutoHotKey Key Notations

Xah Lee, 2010-04-28

This page is a list of notations for AutoHotKey. If you not sure what AutoHotKey is, see: AutoHotKey Basics.

Basic Key Syntax

Here's the basic syntax. This should be enough most of your needs.

#n::Run Notepad     ; this means the Win+n
!n::Run Notepad     ; this means Alt+n
^n::Run Notepad     ; this means Ctrl+n

F6::Run Notepad     ; F6
^F6::Run Notepad    ; Ctrl+F6
^!n::Run Notepad    ; Ctrl+Alt+n

Key Syntax

Here's a complete list of AutoHotKey's key syntax.

F Keys

The syntax is F1, F2, F3... etc, to F24.

Space, Tab, Enter, Home, End, Arrows ...

Space
Tab
Enter (or Return)
Escape (or Esc)
Backspace (or BS)
Delete (or Del)
Insert (or Ins)
Home
End
PgUp
PgDn
Up
Down
Left
Right
ScrollLock
CapsLock
PrintScreen
CtrlBreak
Pause
Break — Since this is synonymous with Pause, use ^CtrlBreak in hotkeys instead of ^Pause or ^Break.

Help — does not exist on most keyboards. This is not the same as F1.

Numberpad Keys

NumLock
Numlock ON  Numlock OFF
Numpad0  NumpadIns
Numpad1  NumpadEnd
Numpad2  NumpadDown
Numpad3  NumpadPgDn
Numpad4  NumpadLeft
Numpad5  NumpadClear
Numpad6  NumpadRight
Numpad7  NumpadHome
Numpad8  NumpadUp
Numpad9  NumpadPgUp
NumpadDot (.)  NumpadDel
NumpadDiv (/)  NumpadDiv (/)
NumpadMult (*)  NumpadMult (*)
NumpadAdd (+)  NumpadAdd (+)
NumpadSub (-)  NumpadSub (-)
NumpadEnter  NumpadEnter

Modifier Keys

AppsKey — aka Menu key

LWin — left Windows logo key
RWin — right Windows logo key

Control (or Ctrl)
LControl (or LCtrl) — left Control key
RControl (or RCtrl) — right Control key

Shift
LShift — left Shift key
RShift — right Shift key

Alt
LAlt — left Alt key
RAlt — right Alt key

<^>! — Alt Graph key. Usually equivalent to “LControl & RAlt”.

Notes:

  • There is no generic "Win" key because the OS does not support it.
  • When your script uses “Shift”, “Alt”, “Control”, they fire upon release of the key. To make them fire on press, put a tilde in front, like this: “~Alt::...”. By contrast, a specific left or right hotkey such as LAlt:: fires when it is pressed down.

Multimedia Special Keys

The following are special keys on keyboards.

Browser_Back
Browser_Forward
Browser_Refresh
Browser_Stop
Browser_Search
Browser_Favorites
Browser_Home

Volume_Mute
Volume_Down
Volume_Up

Media_Next
Media_Prev
Media_Stop
Media_Play_Pause

Launch_Mail
Launch_Media
Launch_App1
Launch_App2

Sleep

References