Key Key Key Key Enum

定义

指定键盘上可能的键值。Specifies the possible key values on a keyboard.

public enum class Key
[System.ComponentModel.TypeConverter(typeof(System.Windows.Input.KeyConverter))]
public enum Key
type Key = 
Public Enum Key
继承
属性

字段

A A A A 44

A 键。The A key.

AbntC1 AbntC1 AbntC1 AbntC1 147

ABNT_C1(巴西)键。The ABNT_C1 (Brazilian) key.

AbntC2 AbntC2 AbntC2 AbntC2 148

ABNT_C2(巴西)键。The ABNT_C2 (Brazilian) key.

Add Add Add Add 85

加号键。The Add key.

Apps Apps Apps Apps 72

应用程序键 (Microsoft Natural Keyboard)。The Application key (Microsoft Natural Keyboard). 也称为菜单键,因为它显示特定于应用程序的上下文菜单。Also known as the Menu key, as it displays an application-specific context menu.

Attn Attn Attn Attn 163

ATTN 键。The ATTN key.

B B B B 45

B 键。The B key.

Back Back Back Back 2

Backspace 键。The Backspace key.

BrowserBack BrowserBack BrowserBack BrowserBack 122

浏览器后退键。The Browser Back key.

BrowserFavorites BrowserFavorites BrowserFavorites BrowserFavorites 127

浏览器收藏键。The Browser Favorites key.

BrowserForward BrowserForward BrowserForward BrowserForward 123

浏览器前进键。The Browser Forward key.

BrowserHome BrowserHome BrowserHome BrowserHome 128

浏览器主页键。The Browser Home key.

BrowserRefresh BrowserRefresh BrowserRefresh BrowserRefresh 124

浏览器刷新键。The Browser Refresh key.

BrowserSearch BrowserSearch BrowserSearch BrowserSearch 126

浏览器搜索键。The Browser Search key.

BrowserStop BrowserStop BrowserStop BrowserStop 125

浏览器停止键。The Browser Stop key.

C C C C 46

C 键。The C key.

Cancel Cancel Cancel Cancel 1

Cancel 键。The Cancel key.

Capital Capital Capital Capital 8

Caps Lock 键。The Caps Lock key.

CapsLock CapsLock CapsLock CapsLock 8

Caps Lock 键。The Caps Lock key.

Clear Clear Clear Clear 5

Clear 键。The Clear key.

CrSel CrSel CrSel CrSel 164

CRSEL 键。The CRSEL key.

D D D D 47

D 键。The D key.

D0 D0 D0 D0 34

0 (零)键。The 0 (zero) key.

D1 D1 D1 D1 35

1 (一)键。The 1 (one) key.

D2 D2 D2 D2 36

2 键。The 2 key.

D3 D3 D3 D3 37

3 键。The 3 key.

D4 D4 D4 D4 38

4 键。The 4 key.

D5 D5 D5 D5 39

5 键。The 5 key.

D6 D6 D6 D6 40

6 键。The 6 key.

D7 D7 D7 D7 41

7 键。The 7 key.

D8 D8 D8 D8 42

8 键。The 8 key.

D9 D9 D9 D9 43

9 键。The 9 key.

DbeAlphanumeric DbeAlphanumeric DbeAlphanumeric DbeAlphanumeric 157

DBE_ALPHANUMERIC 键。The DBE_ALPHANUMERIC key.

DbeCodeInput DbeCodeInput DbeCodeInput DbeCodeInput 167

DBE_CODEINPUT 键。The DBE_CODEINPUT key.

DbeDbcsChar DbeDbcsChar DbeDbcsChar DbeDbcsChar 161

DBE_DBCSCHAR 键。The DBE_DBCSCHAR key.

DbeDetermineString DbeDetermineString DbeDetermineString DbeDetermineString 169

DBE_DETERMINESTRING 键。The DBE_DETERMINESTRING key.

DbeEnterDialogConversionMode DbeEnterDialogConversionMode DbeEnterDialogConversionMode DbeEnterDialogConversionMode 170

DBE_ENTERDLGCONVERSIONMODE 键。The DBE_ENTERDLGCONVERSIONMODE key.

DbeEnterImeConfigureMode DbeEnterImeConfigureMode DbeEnterImeConfigureMode DbeEnterImeConfigureMode 165

DBE_ENTERIMECONFIGMODE 键。The DBE_ENTERIMECONFIGMODE key.

DbeEnterWordRegisterMode DbeEnterWordRegisterMode DbeEnterWordRegisterMode DbeEnterWordRegisterMode 164

DBE_ENTERWORDREGISTERMODE 键。The DBE_ENTERWORDREGISTERMODE key.

DbeFlushString DbeFlushString DbeFlushString DbeFlushString 166

DBE_FLUSHSTRING 键。The DBE_FLUSHSTRING key.

DbeHiragana DbeHiragana DbeHiragana DbeHiragana 159

DBE_HIRAGANA 键。The DBE_HIRAGANA key.

DbeKatakana DbeKatakana DbeKatakana DbeKatakana 158

DBE_KATAKANA 键。The DBE_KATAKANA key.

DbeNoCodeInput DbeNoCodeInput DbeNoCodeInput DbeNoCodeInput 168

DBE_NOCODEINPUT 键。The DBE_NOCODEINPUT key.

DbeNoRoman DbeNoRoman DbeNoRoman DbeNoRoman 163

DBE_NOROMAN 键。The DBE_NOROMAN key.

DbeRoman DbeRoman DbeRoman DbeRoman 162

DBE_ROMAN 键。The DBE_ROMAN key.

DbeSbcsChar DbeSbcsChar DbeSbcsChar DbeSbcsChar 160

DBE_SBCSCHAR 键。The DBE_SBCSCHAR key.

DeadCharProcessed DeadCharProcessed DeadCharProcessed DeadCharProcessed 172

该键与另一个键配合使用,用于创建单一的组合字符。The key is used with another key to create a single combined character.

Decimal Decimal Decimal Decimal 88

句点键。The Decimal key.

Delete Delete Delete Delete 32

Delete 键。The Delete key.

Divide Divide Divide Divide 89

除号键。The Divide key.

Down Down Down Down 26

Down Arrow 键。The Down Arrow key.

E E E E 48

E 键。The E key.

End End End End 21

End 键。The End key.

Enter Enter Enter Enter 6

Enter 键。The Enter key.

EraseEof EraseEof EraseEof EraseEof 166

ERASE EOF 键。The ERASE EOF key.

Escape Escape Escape Escape 13

ESC 键。The ESC key.

Execute Execute Execute Execute 29

Execute 键。The Execute key.

ExSel ExSel ExSel ExSel 165

EXSEL 键。The EXSEL key.

F F F F 49

F 键。The F key.

F1 F1 F1 F1 90

F1 键。The F1 key.

F10 F10 F10 F10 99

F10 键。The F10 key.

F11 F11 F11 F11 100

F11 键。The F11 key.

F12 F12 F12 F12 101

F12 键。The F12 key.

F13 F13 F13 F13 102

F13 键。The F13 key.

F14 F14 F14 F14 103

F14 键。The F14 key.

F15 F15 F15 F15 104

F15 键。The F15 key.

F16 F16 F16 F16 105

F16 键。The F16 key.

F17 F17 F17 F17 106

F17 键。The F17 key.

F18 F18 F18 F18 107

F18 键。The F18 key.

F19 F19 F19 F19 108

F19 键。The F19 key.

F2 F2 F2 F2 91

F2 键。The F2 key.

F20 F20 F20 F20 109

F20 键。The F20 key.

F21 F21 F21 F21 110

F21 键。The F21 key.

F22 F22 F22 F22 111

F22 键。The F22 key.

F23 F23 F23 F23 112

F23 键。The F23 key.

F24 F24 F24 F24 113

F24 键。The F24 key.

F3 F3 F3 F3 92

F3 键。The F3 key.

F4 F4 F4 F4 93

F4 键。The F4 key.

F5 F5 F5 F5 94

F5 键。The F5 key.

F6 F6 F6 F6 95

F6 键。The F6 key.

F7 F7 F7 F7 96

F7 键。The F7 key.

F8 F8 F8 F8 97

F8 键。The F8 key.

F9 F9 F9 F9 98

F9 键。The F9 key.

FinalMode FinalMode FinalMode FinalMode 11

IME Final 模式键。The IME Final mode key.

G G G G 50

G 键。The G key.

H H H H 51

H 键。The H key.

HangulMode HangulMode HangulMode HangulMode 9

IME Hangul 模式键。The IME Hangul mode key.

HanjaMode HanjaMode HanjaMode HanjaMode 12

IME Hanja 模式键。The IME Hanja mode key.

Help Help Help Help 33

Help 键。The Help key.

Home Home Home Home 22

Home 键。The Home key.

I I I I 52

I 键。The I key.

ImeAccept ImeAccept ImeAccept ImeAccept 16

IME Accept 键。The IME Accept key.

ImeConvert ImeConvert ImeConvert ImeConvert 14

IME Convert 键。The IME Convert key.

ImeModeChange ImeModeChange ImeModeChange ImeModeChange 17

IME 模式更改请求。The IME Mode change request.

ImeNonConvert ImeNonConvert ImeNonConvert ImeNonConvert 15

IME NonConvert 键。The IME NonConvert key.

ImeProcessed ImeProcessed ImeProcessed ImeProcessed 155

用于屏蔽 IME 正在处理的真实键的特殊键。A special key masking the real key being processed by an IME.

Insert Insert Insert Insert 31

Insert 键。The Insert key.

J J J J 53

J 键。The J key.

JunjaMode JunjaMode JunjaMode JunjaMode 10

IME Junja 模式键。The IME Junja mode key.

K K K K 54

K 键。The K key.

KanaMode KanaMode KanaMode KanaMode 9

IME Kana 模式键。The IME Kana mode key.

KanjiMode KanjiMode KanjiMode KanjiMode 12

IME Kanji 模式键。The IME Kanji mode key.

L L L L 55

L 键。The L key.

LaunchApplication1 LaunchApplication1 LaunchApplication1 LaunchApplication1 138

启动应用程序 1 键。The Launch Application1 key.

LaunchApplication2 LaunchApplication2 LaunchApplication2 LaunchApplication2 139

启动应用程序 2 键。The Launch Application2 key.

LaunchMail LaunchMail LaunchMail LaunchMail 136

启动邮件键。The Launch Mail key.

Left Left Left Left 23

Left Arrow 键。The Left Arrow key.

LeftAlt LeftAlt LeftAlt LeftAlt 120

左 ALT 键。The left ALT key.

LeftCtrl LeftCtrl LeftCtrl LeftCtrl 118

左 CTRL 键。The left CTRL key.

LeftShift LeftShift LeftShift LeftShift 116

左 Shift 键。The left Shift key.

LineFeed LineFeed LineFeed LineFeed 4

Linefeed 键。The Linefeed key.

LWin LWin LWin LWin 70

左 Windows 徽标键 (Microsoft Natural Keyboard)。The left Windows logo key (Microsoft Natural Keyboard).

M M M M 56

M 键。The M key.

MediaNextTrack MediaNextTrack MediaNextTrack MediaNextTrack 132

媒体下一曲目键。The Media Next Track key.

MediaPlayPause MediaPlayPause MediaPlayPause MediaPlayPause 135

媒体暂停播放键。The Media Play Pause key.

MediaPreviousTrack MediaPreviousTrack MediaPreviousTrack MediaPreviousTrack 133

媒体上一曲目键。The Media Previous Track key.

MediaStop MediaStop MediaStop MediaStop 134

媒体停止键。The Media Stop key.

Multiply Multiply Multiply Multiply 84

乘号键。The Multiply key.

N N N N 57

N 键。The N key.

Next Next Next Next 20

Page Down 键。The Page Down key.

NoName NoName NoName NoName 169

留待将来使用的常数。A constant reserved for future use.

None None None None 0

不按任何键。No key pressed.

NumLock NumLock NumLock NumLock 114

Num Lock 键。The Num Lock key.

NumPad0 NumPad0 NumPad0 NumPad0 74

数字键盘上的 0 键。The 0 key on the numeric keypad.

NumPad1 NumPad1 NumPad1 NumPad1 75

数字键盘上的 1 键。The 1 key on the numeric keypad.

NumPad2 NumPad2 NumPad2 NumPad2 76

数字键盘上的 2 键。The 2 key on the numeric keypad.

NumPad3 NumPad3 NumPad3 NumPad3 77

数字键盘上的 3 键。The 3 key on the numeric keypad.

NumPad4 NumPad4 NumPad4 NumPad4 78

数字键盘上的 4 键。The 4 key on the numeric keypad.

NumPad5 NumPad5 NumPad5 NumPad5 79

数字键盘上的 5 键。The 5 key on the numeric keypad.

NumPad6 NumPad6 NumPad6 NumPad6 80

数字键盘上的 6 键。The 6 key on the numeric keypad.

NumPad7 NumPad7 NumPad7 NumPad7 81

数字键盘上的 7 键。The 7 key on the numeric keypad.

NumPad8 NumPad8 NumPad8 NumPad8 82

数字键盘上的 8 键。The 8 key on the numeric keypad.

NumPad9 NumPad9 NumPad9 NumPad9 83

数字键盘上的 9 键。The 9 key on the numeric keypad.

O O O O 58

O 键。The O key.

Oem1 Oem1 Oem1 Oem1 140

OEM 1 键。The OEM 1 key.

Oem102 Oem102 Oem102 Oem102 154

OEM 102 键。The OEM 102 key.

Oem2 Oem2 Oem2 Oem2 145

OEM 2 键。The OEM 2 key.

Oem3 Oem3 Oem3 Oem3 146

OEM 3 键。The OEM 3 key.

Oem4 Oem4 Oem4 Oem4 149

OEM 4 键。The OEM 4 key.

Oem5 Oem5 Oem5 Oem5 150

OEM 5 键。The OEM 5 key.

Oem6 Oem6 Oem6 Oem6 151

OEM 6 键。The OEM 6 key.

Oem7 Oem7 Oem7 Oem7 152

OEM 7 键。The OEM 7 key.

Oem8 Oem8 Oem8 Oem8 153

OEM 8 键。The OEM 8 key.

OemAttn OemAttn OemAttn OemAttn 157

OEM ATTN 键。The OEM ATTN key.

OemAuto OemAuto OemAuto OemAuto 160

OEM AUTO 键。The OEM AUTO key.

OemBackslash OemBackslash OemBackslash OemBackslash 154

OEM 反斜杠键。The OEM Backslash key.

OemBackTab OemBackTab OemBackTab OemBackTab 162

OEM BACKTAB 键。The OEM BACKTAB key.

OemClear OemClear OemClear OemClear 171

OEM 清除键。The OEM Clear key.

OemCloseBrackets OemCloseBrackets OemCloseBrackets OemCloseBrackets 151

OEM 右大括号键。The OEM Close Brackets key.

OemComma OemComma OemComma OemComma 142

OEM 逗号键。The OEM Comma key.

OemCopy OemCopy OemCopy OemCopy 159

OEM COPY 键。The OEM COPY key.

OemEnlw OemEnlw OemEnlw OemEnlw 161

OEM ENLW 键。The OEM ENLW key.

OemFinish OemFinish OemFinish OemFinish 158

OEM FINISH 键。The OEM FINISH key.

OemMinus OemMinus OemMinus OemMinus 143

OEM 减号键。The OEM Minus key.

OemOpenBrackets OemOpenBrackets OemOpenBrackets OemOpenBrackets 149

OEM 左大括号键。The OEM Open Brackets key.

OemPeriod OemPeriod OemPeriod OemPeriod 144

OEM 句号键。The OEM Period key.

OemPipe OemPipe OemPipe OemPipe 150

OEM 管道键。The OEM Pipe key.

OemPlus OemPlus OemPlus OemPlus 141

OEM 加号键。The OEM Addition key.

OemQuestion OemQuestion OemQuestion OemQuestion 145

OEM 问号键。The OEM Question key.

OemQuotes OemQuotes OemQuotes OemQuotes 152

OEM 引号键。The OEM Quotes key.

OemSemicolon OemSemicolon OemSemicolon OemSemicolon 140

OEM 分号键。The OEM Semicolon key.

OemTilde OemTilde OemTilde OemTilde 146

OEM 颚化符键。The OEM Tilde key.

P P P P 59

P 键。The P key.

Pa1 Pa1 Pa1 Pa1 170

PA1 键。The PA1 key.

PageDown PageDown PageDown PageDown 20

Page Down 键。The Page Down key.

PageUp PageUp PageUp PageUp 19

Page Up 键。The Page Up key.

Pause Pause Pause Pause 7

Pause 键。The Pause key.

Play Play Play Play 167

播放键。The PLAY key.

Print Print Print Print 28

Print 键。The Print key.

PrintScreen PrintScreen PrintScreen PrintScreen 30

Print Screen 键。The Print Screen key.

Prior Prior Prior Prior 19

Page Up 键。The Page Up key.

Q Q Q Q 60

Q 键。The Q key.

R R R R 61

R 键。The R key.

Return Return Return Return 6

Return 键。The Return key.

Right Right Right Right 25

Right Arrow 键。The Right Arrow key.

RightAlt RightAlt RightAlt RightAlt 121

右 ALT 键。The right ALT key.

RightCtrl RightCtrl RightCtrl RightCtrl 119

右 CTRL 键。The right CTRL key.

RightShift RightShift RightShift RightShift 117

右 Shift 键。The right Shift key.

RWin RWin RWin RWin 71

右 Windows 徽标键 (Microsoft Natural Keyboard)。The right Windows logo key (Microsoft Natural Keyboard).

S S S S 62

S 键。The S key.

Scroll Scroll Scroll Scroll 115

Scroll Lock 键。The Scroll Lock key.

Select Select Select Select 27

Select 键。The Select key.

SelectMedia SelectMedia SelectMedia SelectMedia 137

选择媒体键。The Select Media key.

Separator Separator Separator Separator 86

分隔符键。The Separator key.

Sleep Sleep Sleep Sleep 73

计算机休眠键。The Computer Sleep key.

Snapshot Snapshot Snapshot Snapshot 30

Print Screen 键。The Print Screen key.

Space Space Space Space 18

Spacebar 键。The Spacebar key.

Subtract Subtract Subtract Subtract 87

减号键。The Subtract key.

System System System System 156

用于屏蔽作为系统键处理的真实键的特殊键。A special key masking the real key being processed as a system key.

T T T T 63

T 键。The T key.

Tab Tab Tab Tab 3

Tab 键。The Tab key.

U U U U 64

U 键。The U key.

Up Up Up Up 24

Up Arrow 键。The Up Arrow key.

V V V V 65

V 键。The V key.

VolumeDown VolumeDown VolumeDown VolumeDown 130

音量减小键。The Volume Down key.

VolumeMute VolumeMute VolumeMute VolumeMute 129

静音键。The Volume Mute key.

VolumeUp VolumeUp VolumeUp VolumeUp 131

音量增大键。The Volume Up key.

W W W W 66

W 键。The W key.

X X X X 67

X 键。The X key.

Y Y Y Y 68

Y 键。The Y key.

Z Z Z Z 69

Z 键。The Z key.

Zoom Zoom Zoom Zoom 168

缩放键。The ZOOM key.

注解

可以采用多种不同方法,在 WPF 中获取与键输入相关的信息。Information pertaining to key input can be obtained in several different ways in WPF. 与密钥相关的事件,如KeyDownKeyUp,提供通过键的状态信息KeyEventArgs传递给事件处理程序对象。Key-related events, such as KeyDown and KeyUp, provide key state information through the KeyEventArgs object that is passed to the event handler. 键的状态信息还通过静态方法上获得Keyboard类,如IsKeyUpGetKeyStatesKey state information can also be obtained through the static methods on the Keyboard class, such as IsKeyUp and GetKeyStates. Keyboard类报告键盘的当前状态。The Keyboard class reports the current state of the keyboard.

适用于

另请参阅