Key Enumeration

 

Specifies the possible key values on a keyboard.

Namespace:   System.Windows.Input
Assembly:  WindowsBase (in WindowsBase.dll)

[TypeConverterAttribute(typeof(KeyConverter))]
public enum Key

Member nameDescription
A

The A key.

AbntC1

The ABNT_C1 (Brazilian) key.

AbntC2

The ABNT_C2 (Brazilian) key.

Add

The Add key.

Apps

The Application key (Microsoft Natural Keyboard).

Attn

The ATTN key.

B

The B key.

Back

The Backspace key.

BrowserBack

The Browser Back key.

BrowserFavorites

The Browser Favorites key.

BrowserForward

The Browser Forward key.

BrowserHome

The Browser Home key.

BrowserRefresh

The Browser Refresh key.

BrowserSearch

The Browser Search key.

BrowserStop

The Browser Stop key.

C

The C key.

Cancel

The Cancel key.

Capital

The Caps Lock key.

CapsLock

The Caps Lock key.

Clear

The Clear key.

CrSel

The CRSEL key.

D

The D key.

D0

The 0 (zero) key.

D1

The 1 (one) key.

D2

The 2 key.

D3

The 3 key.

D4

The 4 key.

D5

The 5 key.

D6

The 6 key.

D7

The 7 key.

D8

The 8 key.

D9

The 9 key.

DbeAlphanumeric

The DBE_ALPHANUMERIC key.

DbeCodeInput

The DBE_CODEINPUT key.

DbeDbcsChar

The DBE_DBCSCHAR key.

DbeDetermineString

The DBE_DETERMINESTRING key.

DbeEnterDialogConversionMode

The DBE_ENTERDLGCONVERSIONMODE key.

DbeEnterImeConfigureMode

The DBE_ENTERIMECONFIGMODE key.

DbeEnterWordRegisterMode

The DBE_ENTERWORDREGISTERMODE key.

DbeFlushString

The DBE_FLUSHSTRING key.

DbeHiragana

The DBE_HIRAGANA key.

DbeKatakana

The DBE_KATAKANA key.

DbeNoCodeInput

The DBE_NOCODEINPUT key.

DbeNoRoman

The DBE_NOROMAN key.

DbeRoman

The DBE_ROMAN key.

DbeSbcsChar

The DBE_SBCSCHAR key.

DeadCharProcessed

The key is used with another key to create a single combined character.

Decimal

The Decimal key.

Delete

The Delete key.

Divide

The Divide key.

Down

The Down Arrow key.

E

The E key.

End

The End key.

Enter

The Enter key.

EraseEof

The ERASE EOF key.

Escape

The ESC key.

Execute

The Execute key.

ExSel

The EXSEL key.

F

The F key.

F1

The F1 key.

F10

The F10 key.

F11

The F11 key.

F12

The F12 key.

F13

The F13 key.

F14

The F14 key.

F15

The F15 key.

F16

The F16 key.

F17

The F17 key.

F18

The F18 key.

F19

The F19 key.

F2

The F2 key.

F20

The F20 key.

F21

The F21 key.

F22

The F22 key.

F23

The F23 key.

F24

The F24 key.

F3

The F3 key.

F4

The F4 key.

F5

The F5 key.

F6

The F6 key.

F7

The F7 key.

F8

The F8 key.

F9

The F9 key.

FinalMode

The IME Final mode key.

G

The G key.

H

The H key.

HangulMode

The IME Hangul mode key.

HanjaMode

The IME Hanja mode key.

Help

The Help key.

Home

The Home key.

I

The I key.

ImeAccept

The IME Accept key.

ImeConvert

The IME Convert key.

ImeModeChange

The IME Mode change request.

ImeNonConvert

The IME NonConvert key.

ImeProcessed

A special key masking the real key being processed by an IME.

Insert

The Insert key.

J

The J key.

JunjaMode

The IME Junja mode key.

K

The K key.

KanaMode

The IME Kana mode key.

KanjiMode

The IME Kanji mode key.

L

The L key.

LaunchApplication1

The Launch Application1 key.

LaunchApplication2

The Launch Application2 key.

LaunchMail

The Launch Mail key.

Left

The Left Arrow key.

LeftAlt

The left ALT key.

LeftCtrl

The left CTRL key.

LeftShift

The left Shift key.

LineFeed

The Linefeed key.

LWin

The left Windows logo key (Microsoft Natural Keyboard).

M

The M key.

MediaNextTrack

The Media Next Track key.

MediaPlayPause

The Media Play Pause key.

MediaPreviousTrack

The Media Previous Track key.

MediaStop

The Media Stop key.

Multiply

The Multiply key.

N

The N key.

Next

The Page Down key.

NoName

A constant reserved for future use.

None

No key pressed.

NumLock

The Num Lock key.

NumPad0

The 0 key on the numeric keypad.

NumPad1

The 1 key on the numeric keypad.

NumPad2

The 2 key on the numeric keypad.

NumPad3

The 3 key on the numeric keypad.

NumPad4

The 4 key on the numeric keypad.

NumPad5

The 5 key on the numeric keypad.

NumPad6

The 6 key on the numeric keypad.

NumPad7

The 7 key on the numeric keypad.

NumPad8

The 8 key on the numeric keypad.

NumPad9

The 9 key on the numeric keypad.

O

The O key.

Oem1

The OEM 1 key.

Oem102

The OEM 102 key.

Oem2

The OEM 2 key.

Oem3

The OEM 3 key.

Oem4

The OEM 4 key.

Oem5

The OEM 5 key.

Oem6

The OEM 6 key.

Oem7

The OEM 7 key.

Oem8

The OEM 8 key.

OemAttn

The OEM ATTN key.

OemAuto

The OEM AUTO key.

OemBackslash

The OEM Backslash key.

OemBackTab

The OEM BACKTAB key.

OemClear

The OEM Clear key.

OemCloseBrackets

The OEM Close Brackets key.

OemComma

The OEM Comma key.

OemCopy

The OEM COPY key.

OemEnlw

The OEM ENLW key.

OemFinish

The OEM FINISH key.

OemMinus

The OEM Minus key.

OemOpenBrackets

The OEM Open Brackets key.

OemPeriod

The OEM Period key.

OemPipe

The OEM Pipe key.

OemPlus

The OEM Addition key.

OemQuestion

The OEM Question key.

OemQuotes

The OEM Quotes key.

OemSemicolon

The OEM Semicolon key.

OemTilde

The OEM Tilde key.

P

The P key.

Pa1

The PA1 key.

PageDown

The Page Down key.

PageUp

The Page Up key.

Pause

The Pause key.

Play

The PLAY key.

Print

The Print key.

PrintScreen

The Print Screen key.

Prior

The Page Up key.

Q

The Q key.

R

The R key.

Return

The Return key.

Right

The Right Arrow key.

RightAlt

The right ALT key.

RightCtrl

The right CTRL key.

RightShift

The right Shift key.

RWin

The right Windows logo key (Microsoft Natural Keyboard).

S

The S key.

Scroll

The Scroll Lock key.

Select

The Select key.

SelectMedia

The Select Media key.

Separator

The Separator key.

Sleep

The Computer Sleep key.

Snapshot

The Print Screen key.

Space

The Spacebar key.

Subtract

The Subtract key.

System

A special key masking the real key being processed as a system key.

T

The T key.

Tab

The Tab key.

U

The U key.

Up

The Up Arrow key.

V

The V key.

VolumeDown

The Volume Down key.

VolumeMute

The Volume Mute key.

VolumeUp

The Volume Up key.

W

The W key.

X

The X key.

Y

The Y key.

Z

The Z key.

Zoom

The ZOOM key.

Information pertaining to key input can be obtained in several different ways in WPF. Key-related events, such as KeyDown and KeyUp, provide key state information through the KeyEventArgs object that is passed to the event handler. Key state information can also be obtained through the static methods on the Keyboard class, such as IsKeyUp and GetKeyStates. The Keyboard class reports the current state of the keyboard.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: