Key 列舉

定義

在鍵盤上,指定可能的按鍵值。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 44

A 鍵。The A key.

AbntC1 147

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

AbntC2 148

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

Add 85

加號鍵。The Add key.

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 163

ATTN 鍵。The ATTN key.

B 45

B 鍵。The B key.

Back 2

退格鍵。The Backspace key.

BrowserBack 122

瀏覽器上一頁鍵。The Browser Back key.

BrowserFavorites 127

瀏覽器我的最愛鍵。The Browser Favorites key.

BrowserForward 123

瀏覽器下一頁鍵。The Browser Forward key.

BrowserHome 128

瀏覽器首頁鍵。The Browser Home key.

BrowserRefresh 124

瀏覽器重新整理鍵。The Browser Refresh key.

BrowserSearch 126

瀏覽器搜尋鍵。The Browser Search key.

BrowserStop 125

瀏覽器停止鍵。The Browser Stop key.

C 46

C 鍵。The C key.

Cancel 1

取消鍵。The Cancel key.

Capital 8

Caps Lock 鍵。The Caps Lock key.

CapsLock 8

Caps Lock 鍵。The Caps Lock key.

Clear 5

Clear 鍵。The Clear key.

CrSel 164

CRSEL 鍵。The CRSEL key.

D 47

D 鍵。The D key.

D0 34

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

D1 35

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

D2 36

2 鍵。The 2 key.

D3 37

3 鍵。The 3 key.

D4 38

4 鍵。The 4 key.

D5 39

5 鍵。The 5 key.

D6 40

6 鍵。The 6 key.

D7 41

7 鍵。The 7 key.

D8 42

8 鍵。The 8 key.

D9 43

9 鍵。The 9 key.

DbeAlphanumeric 157

DBE_ALPHANUMERIC 鍵。The DBE_ALPHANUMERIC key.

DbeCodeInput 167

DBE_CODEINPUT 鍵。The DBE_CODEINPUT key.

DbeDbcsChar 161

DBE_DBCSCHAR 鍵。The DBE_DBCSCHAR key.

DbeDetermineString 169

DBE_DETERMINESTRING 鍵。The DBE_DETERMINESTRING key.

DbeEnterDialogConversionMode 170

DBE_ENTERDLGCONVERSIONMODE 鍵。The DBE_ENTERDLGCONVERSIONMODE key.

DbeEnterImeConfigureMode 165

DBE_ENTERIMECONFIGMODE 鍵。The DBE_ENTERIMECONFIGMODE key.

DbeEnterWordRegisterMode 164

DBE_ENTERWORDREGISTERMODE 鍵。The DBE_ENTERWORDREGISTERMODE key.

DbeFlushString 166

DBE_FLUSHSTRING 鍵。The DBE_FLUSHSTRING key.

DbeHiragana 159

DBE_HIRAGANA 鍵。The DBE_HIRAGANA key.

DbeKatakana 158

DBE_KATAKANA 鍵。The DBE_KATAKANA key.

DbeNoCodeInput 168

DBE_NOCODEINPUT 鍵。The DBE_NOCODEINPUT key.

DbeNoRoman 163

DBE_NOROMAN 鍵。The DBE_NOROMAN key.

DbeRoman 162

DBE_ROMAN 鍵。The DBE_ROMAN key.

DbeSbcsChar 160

DBE_SBCSCHAR 鍵。The DBE_SBCSCHAR key.

DeadCharProcessed 172

此按鍵用於與另一個按鍵建立單一合併字元。The key is used with another key to create a single combined character.

Decimal 88

小數點鍵。The Decimal key.

Delete 32

Delete 鍵。The Delete key.

Divide 89

除號鍵。The Divide key.

Down 26

向下鍵。The Down Arrow key.

E 48

E 鍵。The E key.

End 21

End 鍵。The End key.

Enter 6

Enter 鍵。The Enter key.

EraseEof 166

ERASE EOF 鍵。The ERASE EOF key.

Escape 13

ESC 鍵。The ESC key.

Execute 29

Execute 鍵。The Execute key.

ExSel 165

EXSEL 鍵。The EXSEL key.

F 49

F 鍵。The F key.

F1 90

F1 鍵。The F1 key.

F10 99

F10 鍵。The F10 key.

F11 100

F11 鍵。The F11 key.

F12 101

F12 鍵。The F12 key.

F13 102

F13 鍵。The F13 key.

F14 103

F14 鍵。The F14 key.

F15 104

F15 鍵。The F15 key.

F16 105

F16 鍵。The F16 key.

F17 106

F17 鍵。The F17 key.

F18 107

F18 鍵。The F18 key.

F19 108

F19 鍵。The F19 key.

F2 91

F2 鍵。The F2 key.

F20 109

F20 鍵。The F20 key.

F21 110

F21 鍵。The F21 key.

F22 111

F22 鍵。The F22 key.

F23 112

F23 鍵。The F23 key.

F24 113

F24 鍵。The F24 key.

F3 92

F3 鍵。The F3 key.

F4 93

F4 鍵。The F4 key.

F5 94

F5 鍵。The F5 key.

F6 95

F6 鍵。The F6 key.

F7 96

F7 鍵。The F7 key.

F8 97

F8 鍵。The F8 key.

F9 98

F9 鍵。The F9 key.

FinalMode 11

輸入法 Final 模式鍵。The IME Final mode key.

G 50

G 鍵。The G key.

H 51

H 鍵。The H key.

HangulMode 9

輸入法 Hangul 模式鍵。The IME Hangul mode key.

HanjaMode 12

輸入法 Hanja 模式鍵。The IME Hanja mode key.

Help 33

Help 鍵。The Help key.

Home 22

Home 鍵。The Home key.

I 52

I 鍵。The I key.

ImeAccept 16

輸入法接受鍵。The IME Accept key.

ImeConvert 14

輸入法轉換鍵。The IME Convert key.

ImeModeChange 17

輸入法模式變更要求。The IME Mode change request.

ImeNonConvert 15

輸入法非轉換鍵。The IME NonConvert key.

ImeProcessed 155

遮蔽 IME 正在處理之實際鍵的特殊鍵。A special key masking the real key being processed by an IME.

Insert 31

Insert 鍵。The Insert key.

J 53

J 鍵。The J key.

JunjaMode 10

輸入法 Junja 模式鍵。The IME Junja mode key.

K 54

K 鍵。The K key.

KanaMode 9

輸入法 Kana 模式鍵。The IME Kana mode key.

KanjiMode 12

輸入法 Kanji 模式鍵。The IME Kanji mode key.

L 55

L 鍵。The L key.

LaunchApplication1 138

啟動應用程式 1 鍵。The Launch Application1 key.

LaunchApplication2 139

啟動應用程式 2 鍵。The Launch Application2 key.

LaunchMail 136

啟動郵件鍵。The Launch Mail key.

Left 23

向左鍵。The Left Arrow key.

LeftAlt 120

左 ALT 鍵。The left ALT key.

LeftCtrl 118

左 CTRL 鍵。The left CTRL key.

LeftShift 116

左 Shift 鍵。The left Shift key.

LineFeed 4

換行字元鍵。The Linefeed key.

LWin 70

左 Windows 標誌鍵 (Microsoft Natural Keyboard)。The left Windows logo key (Microsoft Natural Keyboard).

M 56

M 鍵。The M key.

MediaNextTrack 132

媒體下一首鍵。The Media Next Track key.

MediaPlayPause 135

媒體播放/暫停鍵。The Media Play Pause key.

MediaPreviousTrack 133

媒體上一首鍵。The Media Previous Track key.

MediaStop 134

媒體停止鍵。The Media Stop key.

Multiply 84

乘號鍵。The Multiply key.

N 57

N 鍵。The N key.

Next 20

Page Down 鍵。The Page Down key.

NoName 169

保留供未來使用的常數。A constant reserved for future use.

None 0

未按下任何鍵。No key pressed.

NumLock 114

Num Lock 鍵。The Num Lock key.

NumPad0 74

數字鍵台上的 0 鍵。The 0 key on the numeric keypad.

NumPad1 75

數字鍵台上的 1 鍵。The 1 key on the numeric keypad.

NumPad2 76

數字鍵台上的 2 鍵。The 2 key on the numeric keypad.

NumPad3 77

數字鍵台上的 3 鍵。The 3 key on the numeric keypad.

NumPad4 78

數字鍵台上的 4 鍵。The 4 key on the numeric keypad.

NumPad5 79

數字鍵台上的 5 鍵。The 5 key on the numeric keypad.

NumPad6 80

數字鍵台上的 6 鍵。The 6 key on the numeric keypad.

NumPad7 81

數字鍵台上的 7 鍵。The 7 key on the numeric keypad.

NumPad8 82

數字鍵台上的 8 鍵。The 8 key on the numeric keypad.

NumPad9 83

數字鍵台上的 9 鍵。The 9 key on the numeric keypad.

O 58

O 鍵。The O key.

Oem1 140

OEM 1 鍵。The OEM 1 key.

Oem102 154

OEM 102 鍵。The OEM 102 key.

Oem2 145

OEM 2 鍵。The OEM 2 key.

Oem3 146

OEM 3 鍵。The OEM 3 key.

Oem4 149

OEM 4 鍵。The OEM 4 key.

Oem5 150

OEM 5 鍵。The OEM 5 key.

Oem6 151

OEM 6 鍵。The OEM 6 key.

Oem7 152

OEM 7 鍵。The OEM 7 key.

Oem8 153

OEM 8 鍵。The OEM 8 key.

OemAttn 157

OEM ATTN 鍵。The OEM ATTN key.

OemAuto 160

OEM AUTO 鍵。The OEM AUTO key.

OemBackslash 154

OEM 反斜線鍵。The OEM Backslash key.

OemBackTab 162

OEM BACKTAB 鍵。The OEM BACKTAB key.

OemClear 171

OEM Clear 鍵。The OEM Clear key.

OemCloseBrackets 151

OEM 右括弧鍵。The OEM Close Brackets key.

OemComma 142

OEM 逗號鍵。The OEM Comma key.

OemCopy 159

OEM 複製鍵。The OEM COPY key.

OemEnlw 161

OEM ENLW 鍵。The OEM ENLW key.

OemFinish 158

OEM 完成鍵。The OEM FINISH key.

OemMinus 143

OEM 減號鍵。The OEM Minus key.

OemOpenBrackets 149

OEM 左括弧鍵。The OEM Open Brackets key.

OemPeriod 144

OEM 句號鍵。The OEM Period key.

OemPipe 150

OEM 直立線符號鍵。The OEM Pipe key.

OemPlus 141

OEM 加號鍵。The OEM Addition key.

OemQuestion 145

OEM 問號鍵。The OEM Question key.

OemQuotes 152

OEM 引號鍵。The OEM Quotes key.

OemSemicolon 140

OEM 分號鍵。The OEM Semicolon key.

OemTilde 146

OEM 波狀符號鍵。The OEM Tilde key.

P 59

P 鍵。The P key.

Pa1 170

PA1 鍵。The PA1 key.

PageDown 20

Page Down 鍵。The Page Down key.

PageUp 19

Page Up 鍵。The Page Up key.

Pause 7

Pause 鍵。The Pause key.

Play 167

PLAY 鍵。The PLAY key.

Print 28

Print 鍵。The Print key.

PrintScreen 30

Print Screen 鍵。The Print Screen key.

Prior 19

Page Up 鍵。The Page Up key.

Q 60

Q 鍵。The Q key.

R 61

R 鍵。The R key.

Return 6

Return 鍵。The Return key.

Right 25

向右鍵。The Right Arrow key.

RightAlt 121

右 ALT 鍵。The right ALT key.

RightCtrl 119

右 CTRL 鍵。The right CTRL key.

RightShift 117

右 Shift 鍵。The right Shift key.

RWin 71

右 Windows 標誌鍵 (Microsoft Natural Keyboard)。The right Windows logo key (Microsoft Natural Keyboard).

S 62

S 鍵。The S key.

Scroll 115

Scroll Lock 鍵。The Scroll Lock key.

Select 27

Select 鍵。The Select key.

SelectMedia 137

選取媒體鍵。The Select Media key.

Separator 86

分隔符號鍵。The Separator key.

Sleep 73

電腦睡眠鍵。The Computer Sleep key.

Snapshot 30

Print Screen 鍵。The Print Screen key.

Space 18

空格鍵。The Spacebar key.

Subtract 87

減號鍵。The Subtract key.

System 156

遮蔽正作為系統鍵處理之實際鍵的特殊鍵。A special key masking the real key being processed as a system key.

T 63

T 鍵。The T key.

Tab 3

Tab 鍵。The Tab key.

U 64

U 鍵。The U key.

Up 24

向上鍵。The Up Arrow key.

V 65

V 鍵。The V key.

VolumeDown 130

音量降低鍵。The Volume Down key.

VolumeMute 129

靜音鍵。The Volume Mute key.

VolumeUp 131

音量提高鍵。The Volume Up key.

W 66

W 鍵。The W key.

X 67

X 鍵。The X key.

Y 68

Y 鍵。The Y key.

Z 69

Z 鍵。The Z key.

Zoom 168

ZOOM 鍵。The ZOOM key.

備註

在 WPF 中, 可以透過數種不同的方式來取得有關金鑰輸入的資訊。Information pertaining to key input can be obtained in several different ways in WPF. 與索引鍵相關的事件 ( KeyDown例如KeyUp和), 會透過傳遞至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類別上的靜態方法取得, IsKeyUp例如和GetKeyStatesKey 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.

適用於

另請參閱