Enum Keys
Specifies key codes and modifiers.
[Flags]
public enum Keys
Fields
A = 65
The A key.
Add = LButton | Multiply
The add key.
Alt = 262144
The ALT modifier key.
Apps = LButton | RWin
The application key (Microsoft Natural Keyboard).
Attn = Capital | Oem102
The ATTN key.
B = 66
The B key.
Back = 8
The BACKSPACE key.
BrowserBack = RButton | LMenu
The browser back key (Windows 2000 or later).
BrowserFavorites = LButton | BrowserSearch
The browser favorites key (Windows 2000 or later).
BrowserForward = LButton | BrowserBack
The browser forward key (Windows 2000 or later).
BrowserHome = MButton | BrowserRefresh
The browser home key (Windows 2000 or later).
BrowserRefresh = Back | LShiftKey
The browser refresh key (Windows 2000 or later).
BrowserSearch = RButton | BrowserRefresh
The browser search key (Windows 2000 or later).
BrowserStop = LButton | BrowserRefresh
The browser stop key (Windows 2000 or later).
C = LButton | B
The C key.
Cancel = LButton | RButton
The CANCEL key.
Capital = MButton | ShiftKey
The CAPS LOCK key.
CapsLock = MButton | ShiftKey
The CAPS LOCK key.
Clear = MButton | Back
The CLEAR key.
Control = 131072
The CTRL modifier key.
ControlKey = LButton | ShiftKey
The CTRL key.
Crsel = LButton | Attn
The CRSEL key.
D = 68
The D key.
D0 = ShiftKey | Space
The 0 key.
D1 = LButton | D0
The 1 key.
D2 = RButton | D0
The 2 key.
D3 = LButton | D2
The 3 key.
D4 = MButton | D0
The 4 key.
D5 = LButton | D4
The 5 key.
D6 = RButton | D4
The 6 key.
D7 = LButton | D6
The 7 key.
D8 = Back | D0
The 8 key.
D9 = LButton | D8
The 9 key.
Decimal = RButton | Separator
The decimal key.
Delete = RButton | PrintScreen
The DEL key.
Divide = LButton | Decimal
The divide key.
Down = Back | Space
The DOWN ARROW key.
E = LButton | D
The E key.
End = LButton | Next
The END key.
Enter = LButton | Clear
The ENTER key.
EraseEof = LButton | Exsel
The ERASE EOF key.
Escape = RButton | HanjaMode
The ESC key.
Execute = LButton | Print
The EXECUTE key.
Exsel = D8 | Oem3
The EXSEL key.
F = RButton | D
The F key.
F1 = ShiftKey | NumPad0
The F1 key.
F10 = LButton | F9
The F10 key.
F11 = RButton | F9
The F11 key.
F12 = LButton | F11
The F12 key.
F13 = MButton | F9
The F13 key.
F14 = LButton | F13
The F14 key.
F15 = RButton | F13
The F15 key.
F16 = LButton | F15
The F16 key.
F17 = 128
The F17 key.
F18 = LButton | F17
The F18 key.
F19 = RButton | F17
The F19 key.
F2 = LButton | F1
The F2 key.
F20 = LButton | F19
The F20 key.
F21 = MButton | F17
The F21 key.
F22 = LButton | F21
The F22 key.
F23 = RButton | F21
The F23 key.
F24 = LButton | F23
The F24 key.
F3 = RButton | F1
The F3 key.
F4 = LButton | F3
The F4 key.
F5 = MButton | F1
The F5 key.
F6 = LButton | F5
The F6 key.
F7 = RButton | F5
The F7 key.
F8 = LButton | F7
The F8 key.
F9 = Back | F1
The F9 key.
FinalMode = Back | ShiftKey
The IME final mode key.
G = LButton | F
The G key.
H = 72
The H key.
HanguelMode = LButton | Capital
The IME Hanguel mode key (maintained for compatibility; use
HangulMode
).HangulMode = LButton | Capital
The IME Hangul mode key.
HanjaMode = LButton | FinalMode
The IME Hanja mode key.
Help = LButton | Delete
The HELP key.
Home = MButton | Space
The HOME key.
I = LButton | H
The I key.
IMEAccept = RButton | IMEConvert
The IME accept key, replaces IMEAceept.
IMEAceept = RButton | IMEConvert
The IME accept key. Obsolete, use IMEAccept instead.
IMEConvert = MButton | FinalMode
The IME convert key.
IMEModeChange = LButton | IMEAccept
The IME mode change key.
IMENonconvert = LButton | IMEConvert
The IME nonconvert key.
Insert = LButton | PrintScreen
The INS key.
J = RButton | H
The J key.
JunjaMode = RButton | HanguelMode
The IME Junja mode key.
K = LButton | J
The K key.
KanaMode = LButton | Capital
The IME Kana mode key.
KanjiMode = LButton | FinalMode
The IME Kanji mode key.
KeyCode = 65535
The bitmask to extract a key code from a key value.
L = MButton | H
The L key.
LButton = 1
The left mouse button.
LControlKey = RButton | LShiftKey
The left CTRL key.
LMenu = MButton | LShiftKey
The left ALT key.
LShiftKey = Space | F17
The left SHIFT key.
LWin = LButton | Z
The left Windows logo key (Microsoft Natural Keyboard).
LaunchApplication1 = RButton | LaunchMail
The start application one key (Windows 2000 or later).
LaunchApplication2 = LButton | LaunchApplication1
The start application two key (Windows 2000 or later).
LaunchMail = MButton | MediaNextTrack
The launch mail key (Windows 2000 or later).
Left = LButton | Home
The LEFT ARROW key.
LineFeed = RButton | Back
The LINEFEED key.
M = LButton | L
The M key.
MButton = 4
The middle mouse button (three-button mouse).
MediaNextTrack = ShiftKey | LShiftKey
The media next track key (Windows 2000 or later).
MediaPlayPause = LButton | MediaStop
The media play pause key (Windows 2000 or later).
MediaPreviousTrack = LButton | MediaNextTrack
The media previous track key (Windows 2000 or later).
MediaStop = RButton | MediaNextTrack
The media Stop key (Windows 2000 or later).
Menu = RButton | ShiftKey
The ALT key.
Modifiers = -65536
The bitmask to extract modifiers from a key value.
Multiply = RButton | NumPad8
The multiply key.
N = RButton | L
The N key.
Next = RButton | Space
The PAGE DOWN key.
NoName = MButton | Exsel
A constant reserved for future use.
None = 0
No key pressed.
NumLock = ShiftKey | F17
The NUM LOCK key.
NumPad0 = 96
The 0 key on the numeric keypad.
NumPad1 = LButton | NumPad0
The 1 key on the numeric keypad.
NumPad2 = RButton | NumPad0
The 2 key on the numeric keypad.
NumPad3 = LButton | NumPad2
The 3 key on the numeric keypad.
NumPad4 = MButton | NumPad0
The 4 key on the numeric keypad.
NumPad5 = LButton | NumPad4
The 5 key on the numeric keypad.
NumPad6 = RButton | NumPad4
The 6 key on the numeric keypad.
NumPad7 = LButton | NumPad6
The 7 key on the numeric keypad.
NumPad8 = Back | NumPad0
The 8 key on the numeric keypad.
NumPad9 = LButton | NumPad8
The 9 key on the numeric keypad.
O = LButton | N
The O key.
Oem1 = Back | MediaStop
The OEM 1 key, same as code OemSemicolon.
Oem102 = Next | Oem3
The OEM 102 key, same code as OemBackslash.
Oem2 = LButton | OemPeriod
The OEM 2 key, same as code OemQuestion.
Oem3 = 192
The OEM 3 key, same as Oemtilde.
Oem4 = Escape | Oem3
The OEM 4 key, same as OemOpenBrackets.
Oem5 = IMEConvert | Oem3
The OEM 5 key, same code as OemPipe.
Oem6 = LButton | Oem5
The OEM 6 key, same code as OemCloseBrackets.
Oem7 = RButton | Oem5
The OEM 7 key, same code as OemQuotes.
Oem8 = LButton | Oem7
The OEM 8 key.
OemBackslash = Next | Oem3
The OEM angle bracket or backslash key on the RT 102 key keyboard (Windows 2000 or later).
OemClear = RButton | NoName
The CLEAR key.
OemCloseBrackets = LButton | Oem5
The OEM close bracket key on a US standard keyboard (Windows 2000 or later).
OemMinus = LButton | Oemcomma
The OEM minus key on any country/region keyboard (Windows 2000 or later).
OemOpenBrackets = Escape | Oem3
The OEM open bracket key on a US standard keyboard (Windows 2000 or later).
OemPeriod = RButton | Oemcomma
The OEM period key on any country/region keyboard (Windows 2000 or later).
OemPipe = IMEConvert | Oem3
The OEM pipe key on a US standard keyboard (Windows 2000 or later).
OemQuestion = LButton | OemPeriod
The OEM question mark key on a US standard keyboard (Windows 2000 or later).
OemQuotes = RButton | Oem5
The OEM singled/double quote key on a US standard keyboard (Windows 2000 or later).
OemSemicolon = Back | MediaStop
The OEM Semicolon key on a US standard keyboard (Windows 2000 or later).
Oemcomma = Back | LaunchMail
The OEM comma key on any country/region keyboard (Windows 2000 or later).
Oemplus = LButton | Oem1
The OEM plus key on any country/region keyboard (Windows 2000 or later).
Oemtilde = 192
The OEM tilde key on a US standard keyboard (Windows 2000 or later).
P = 80
The P key.
Pa1 = LButton | NoName
The PA1 key.
Packet = RButton | ProcessKey
Used to pass Unicode characters as if they were keystrokes. The Packet key value is the low word of a 32-bit virtual-key value used for non-keyboard input methods.
PageDown = RButton | Space
The PAGE DOWN key.
PageUp = LButton | Space
The PAGE UP key.
Pause = LButton | Menu
The PAUSE key.
Play = RButton | Exsel
The PLAY key.
Print = RButton | Down
The PRINT key.
PrintScreen = MButton | Down
The PRINT SCREEN key.
Prior = LButton | Space
The PAGE UP key.
ProcessKey = Left | Oem3
The PROCESS KEY key.
Q = LButton | P
The Q key.
R = RButton | P
The R key.
RButton = 2
The right mouse button.
RControlKey = LButton | LControlKey
The right CTRL key.
RMenu = LButton | LMenu
The right ALT key.
RShiftKey = LButton | LShiftKey
The right SHIFT key.
RWin = MButton | X
The right Windows logo key (Microsoft Natural Keyboard).
Return = LButton | Clear
The RETURN key.
Right = LButton | Up
The RIGHT ARROW key.
S = LButton | R
The S key.
Scroll = LButton | NumLock
The SCROLL LOCK key.
Select = LButton | Down
The SELECT key.
SelectMedia = LButton | LaunchMail
The select media key (Windows 2000 or later).
Separator = MButton | NumPad8
The separator key.
Shift = 65536
The SHIFT modifier key.
ShiftKey = 16
The SHIFT key.
Sleep = RButton | Apps
The computer sleep key.
Snapshot = MButton | Down
The PRINT SCREEN key.
Space = 32
The SPACEBAR key.
Subtract = LButton | Separator
The subtract key.
T = MButton | P
The T key.
Tab = LButton | Back
The TAB key.
U = LButton | T
The U key.
Up = RButton | Home
The UP ARROW key.
V = RButton | T
The V key.
VolumeDown = RButton | BrowserHome
The volume down key (Windows 2000 or later).
VolumeMute = LButton | BrowserHome
The volume mute key (Windows 2000 or later).
VolumeUp = LButton | VolumeDown
The volume up key (Windows 2000 or later).
W = LButton | V
The W key.
X = Back | P
The X key.
XButton1 = LButton | MButton
The first x mouse button (five-button mouse).
XButton2 = RButton | MButton
The second x mouse button (five-button mouse).
Y = LButton | X
The Y key.
Z = RButton | X
The Z key.
Zoom = LButton | Play
The ZOOM key.