these are useful when you want to define a modifier key by itself, without combining other keys.
Key
Syntax
left Windows logo
LWin
right Windows logo
RWin
Control
Control
left Control
LControl
right Control
RControl
Shift
Shift
left Shift
LShift
right Shift
RShift
Alt
Alt
left Alt
LAlt
right Alt
RAlt
Menu Key
AppsKey
Example. Combine Modifier Keys
Example. Key combination on the right-hand-side
#Requires AutoHotkey v2.0
; make right Ctrl do Ctrl+Alt+Shift+9
RControl::Send"^!+9"
Example. Modifier keys combination on the left-hand-side
#Requires AutoHotkey v2.0
F7 & F8::Run"Notepad"
#Requires AutoHotkey v2.0
; make Ctrl+F5 do Ctrl+t
Control & F5::Send ("^t")
; switch to next window and hide current. Alt+Esc
LWin & F7::Send"!{Esc}"; switch to previous window. Alt+Shift+Esc
LWin & F8::Send"!+{Esc}"
Action on Press or Release
If your script defines actions for any of Shift, Alt, Ctrl, they fire upon release of the key.
To make them fire on press, put a tilde in front, like this: ~Alt.
A specific left or right hotkey such as LAlt:: fires when it is pressed down.
#Requires AutoHotkey v2.0
; disable Win key behavior of popping up the Start Menu, but still allow Win+key combination.
~LWin::Send("{Blind}{vkE8}")
~RWin::Send("{Blind}{vkE8}")
Function Keys
#Requires AutoHotkey v2.0
; F1 key
F1::Run"Notepad"; Ctrl+F1
^F1::Run"Notepad"
Space, Tab, Enter, Escape
Key
Syntax
space
Space
tab
Tab
enter
Enter
escape
Esc
backspace
Backspace
#Requires AutoHotkey v2.0
; Space key
Space::Run"Notepad"; Ctrl+Space
^Space::Run"Notepad"
Home, End, Ins, Del, Page Up/Down
Key
Syntax
delete
Del
insert
Ins
home
Home
end
End
page up
PgUp
page down
PgDn
Arrow Keys
Key
Syntax
↑
Up
↓
Down
←
Left
→
Right
Pause, Print Screen, Screen Lock, Capslock
Key
Syntax
ScrLk
ScrollLock
CapsLock
CapsLock
PrtScn/SysRq
PrintScreen
Pause/Break
Pause
If you want Ctrl+Pause, use the syntax ^CtrlBreak.
Numberpad Keys
Key
Syntax
Num Lock
NumLock
Keys When Number Lock is On
Key
Syntax
0
Numpad0
1
Numpad1
2
Numpad2
3
Numpad3
4
Numpad4
5
Numpad5
6
Numpad6
7
Numpad7
8
Numpad8
9
Numpad9
+
NumpadAdd
/
NumpadDiv
.
NumpadDot
*
NumpadMult
-
NumpadSub
Enter
NumpadEnter
Keys When Number Lock is Off
Key
Syntax
End
NumpadEnd
Home
NumpadHome
PgDn
NumpadPgDn
PgUp
NumpadPgUp
Del
NumpadDel
Ins
NumpadIns
←
NumpadLeft
→
NumpadRight
↑
NumpadUp
↓
NumpadDown
Multimedia Special Keys
The following are syntax for special buttons on many of today's keyboards.