Keyboard mnemonics
SendKeys function simulates keyboard input. For special characters, the keyboard mnemonics are as below.
For example, if you want to send the special character < into notepad:
shell("notepad")
UseWindow("NOTEPAD.EXE|Edit|",1)'We want to type 3<5<10
a$="3"+"<Lower>"+"5"+"<Lower>"+"10"
SendKeys(a$)
Non-numeric keyboard
<F1> ... <F12>
F1 to F12
<CapsLock>
Caps Lock
<Tab>
Tab key
<Esc>
Escape
<Backspace>
Backspace
<ScrollLock>
Scroll Lock
<Ins>
Insert
<Del>
Delete
<Right>
Right arrow
<Left>
Left arrow
<Down>
Down arrow
<Up>
Up arrow
<PageUp>
Page Up
<PageDown>
Page Down
<Home>
Home
<End>
End
<Doublequote>
"
<Pipe>
| Symbol
<Lower>
< Symbol
<Greater>
> Symbol
<Enter>
Enter
<RCtrl>
Right Control
<Ctrl>
Left Control
<RShift>
Right Shift
<Shift>
Left Shift
<Alt>
Alt
<AltGr>
AltGr
<Pause>
Pause
<PrtSc>
Print Screen
Note there is no mnemonic for Space, use " " ( a space between the double quotes).
These keys can be modified by <Ctrl>, <Alt>, <Shift> and <RShift>.
Syntax is :
<Ctrl a> ' Left Control a
<Shift <Ctrl a>> ' Left Shift Left Control a
<Ctrl <Shift <Alt a>>> ' Left Control Left Shift Alt a
(the space between each modifier is mandatory)
Numeric keyboard
Syntax is the same but the reserved word "Num" is added.
<NumLock>
Locks the numeric keypad
<Num 0> ... <Num 9>
0 to 9 on the numeric keypad (if NumLock is on)
<Num .>
. on the numeric keypad
<Num +>
+ on the numeric keypad
<Num ->
- on the numeric keypad
<Num />
/ on the numeric keypad
<Num *>
* on the numeric keypad
<Num Enter>
Enter on the numeric keypad
<Num Left>
Left arrow on the numeric keypad
<Num Right>
Right arrow on the numeric keypad
<Num Down>
Down arrow on the numeric keypad
<Num Up>
Up arrow on the numeric keypad
<Num PageUp>
Page Up on the numeric keypad
<Num PageDown>
Page Down on the numeric keypad
<Num Home>
Home on the numeric keypad
<Num Insert>
Insert on the numeric keypad
<Num Del>
Delete on the numeric keypad
<None>
5 on the numeric keypad if NumLock is off