Programming with Reflection
PC Key Names
Keys on Enhanced 101 and Enhanced 102 keyboards are referred to by specific names when used as arguments in Reflection methods (such as the KeyOrChord argument for the SetKeyMap method).
In the following table, keys are listed first for the main keypad, followed by keys appearing on the cursor keypad and the numeric keypad. Keys are followed by the key name that should be used when specifying an argument in a Reflection method.
Alphabetic, function, and number keys in the main keypad area are represented by the character on the key (for example "a", "F1", or "1"), and are not listed in this table.
Tip
Change the Show Key Help setting to Yes (KbdMapShowKeyHelp property = True) to see keyboard constants in the Keyboard Setup dialog box. After you have changed this setting, click and hold the left mouse button on a PC or host key to see the key constant displayed at the bottom of the dialog box.
Main Keypad Key Name
Escape Esc
` Grave
Tab Tab
Caps Lock CapsLock
Left Shift LeftShift
Right Shift RightShift
Left Control LeftControl
Right Control RightControl
- Dash
= Equals
Backspace Backspace
[ OpenBracket
] CloseBracket
\ BackSlash
; Semicolon
' Apostrophe
Enter Return
, Comma
. Period
/ Slash
Spacebar Space
Cursor Keypad Key Name
Print Screen Snapshot
Scroll Lock ScrollLock
Pause PauseKey
Insert CpIns
Delete CpDel
Home CpHome
End CpEnd
Page Up CpPgUp
Page Down CpPgDn
Up Arrow CpUp
Down Arrow CpDown
Left Arrow CpLeft
Right Arrow CpRight
Numeric Keypad Key Name
Num Lock Numlock
/ KpDivide
* KpMultiply
- KpMinus
+ KpPlus
Enter CpEnter
Home Home
End End
Up Arrow UpKey
Down Arrow DownKey
PgUp PgUp
PgDn PgDn
Left Arrow LeftKey
Center Center
Right Arrow RightKey
Ins Ins
Del Del