VirtualKey VirtualKey VirtualKey VirtualKey VirtualKey Enum


Specifies the values for each virtual key.

The keys listed below are virtual, which means that they are not the physical keys or buttons on an attached keyboard or device, but an abstract mapping of those keys that may be connected to hardware that provides either those keys and buttons or an interface that simulates their physical behavior (such as an onscreen touch keyboard).

public : enum class VirtualKey
enum class winrt::Windows::System::VirtualKey : int32_t
public enum VirtualKey
Public Enum VirtualKey
var value = Windows.System.VirtualKey.a;
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


A A A A A 65

The letter "A" key.

Accept Accept Accept Accept Accept 30

The accept button or key.

Add Add Add Add Add 107

The add (+) operation key as located on a numeric pad.

Application Application Application Application Application 93

The application key or button.

B B B B B 66

The letter "B" key.

Back Back Back Back Back 8

The virtual back key or button.

C C C C C 67

The letter "C" key.

Cancel Cancel Cancel Cancel Cancel 3

The cancel key or button


CapitalLock CapitalLock CapitalLock CapitalLock CapitalLock 20

The Caps Lock key or button.

Clear Clear Clear Clear Clear 12

The Clear key or button.

Control Control Control Control Control 17

The Ctrl key. This is the general Ctrl case, applicable to key layouts with only one Ctrl key or that do not need to differentiate between left Ctrl and right Ctrl keystrokes.

Convert Convert Convert Convert Convert 28

The convert button or key.

D D D D D 68

The letter "D" key.

Decimal Decimal Decimal Decimal Decimal 110

The decimal (.) key as located on a numeric pad.

Delete Delete Delete Delete Delete 46

The Delete key.

Divide Divide Divide Divide Divide 111

The divide (/) operation key as located on a numeric pad.

Down Down Down Down Down 40

The Down Arrow key.

E E E E E 69

The letter "E" key.

End End End End End 35

The End key.

Enter Enter Enter Enter Enter 13

The Enter key.

Escape Escape Escape Escape Escape 27

The Esc key.

Execute Execute Execute Execute Execute 43

The execute key or button.

F F F F F 70

The letter "F" key.

F1 F1 F1 F1 F1 112

The F1 function key.

F10 F10 F10 F10 F10 121

The F10 function key.

F11 F11 F11 F11 F11 122

The F11 function key.

F12 F12 F12 F12 F12 123

The F12 function key.

F13 F13 F13 F13 F13 124

The F13 function key.

F14 F14 F14 F14 F14 125

The F14 function key.

F15 F15 F15 F15 F15 126

The F15 function key.

F16 F16 F16 F16 F16 127

The F16 function key.

F17 F17 F17 F17 F17 128

The F17 function key.

F18 F18 F18 F18 F18 129

The F18 function key.

F19 F19 F19 F19 F19 130

The F19 function key.

F2 F2 F2 F2 F2 113

The F2 function key.

F20 F20 F20 F20 F20 131

The F20 function key.

F21 F21 F21 F21 F21 132

The F21 function key.

F22 F22 F22 F22 F22 133

The F22 function key.

F23 F23 F23 F23 F23 134

The F23 function key.

F24 F24 F24 F24 F24 135

The F24 function key.

F3 F3 F3 F3 F3 114

The F3 function key.

F4 F4 F4 F4 F4 115

The F4 function key.

F5 F5 F5 F5 F5 116

The F5 function key.

F6 F6 F6 F6 F6 117

The F6 function key.

F7 F7 F7 F7 F7 118

The F7 function key.

F8 F8 F8 F8 F8 119

The F8 function key.

F9 F9 F9 F9 F9 120

The F9 function key.

Favorites Favorites Favorites Favorites Favorites 171

The favorites key.

Final Final Final Final Final 24

The Final symbol key-shift button.

G G G G G 71

The letter "G" key.

GamepadA GamepadA GamepadA GamepadA GamepadA 195

The gamepad A button.

GamepadB GamepadB GamepadB GamepadB GamepadB 196

The gamepad B button.

GamepadDPadDown GamepadDPadDown GamepadDPadDown GamepadDPadDown GamepadDPadDown 204

The gamepad d-pad down.

GamepadDPadLeft GamepadDPadLeft GamepadDPadLeft GamepadDPadLeft GamepadDPadLeft 205

The gamepad d-pad left.

GamepadDPadRight GamepadDPadRight GamepadDPadRight GamepadDPadRight GamepadDPadRight 206

The gamepad d-pad right.

GamepadDPadUp GamepadDPadUp GamepadDPadUp GamepadDPadUp GamepadDPadUp 203

The gamepad d-pad up.

GamepadLeftShoulder GamepadLeftShoulder GamepadLeftShoulder GamepadLeftShoulder GamepadLeftShoulder 200

The gamepad left shoulder.

GamepadLeftThumbstickButton GamepadLeftThumbstickButton GamepadLeftThumbstickButton GamepadLeftThumbstickButton GamepadLeftThumbstickButton 209

The gamepad left thumbstick button.

GamepadLeftThumbstickDown GamepadLeftThumbstickDown GamepadLeftThumbstickDown GamepadLeftThumbstickDown GamepadLeftThumbstickDown 212

The gamepad left thumbstick down.

GamepadLeftThumbstickLeft GamepadLeftThumbstickLeft GamepadLeftThumbstickLeft GamepadLeftThumbstickLeft GamepadLeftThumbstickLeft 214

The gamepad left thumbstick left.

GamepadLeftThumbstickRight GamepadLeftThumbstickRight GamepadLeftThumbstickRight GamepadLeftThumbstickRight GamepadLeftThumbstickRight 213

The gamepad left thumbstick right.

GamepadLeftThumbstickUp GamepadLeftThumbstickUp GamepadLeftThumbstickUp GamepadLeftThumbstickUp GamepadLeftThumbstickUp 211

The gamepad left thumbstick up.

GamepadLeftTrigger GamepadLeftTrigger GamepadLeftTrigger GamepadLeftTrigger GamepadLeftTrigger 201

The gamepad left trigger.

GamepadMenu GamepadMenu GamepadMenu GamepadMenu GamepadMenu 207

The gamepad menu button.

GamepadRightShoulder GamepadRightShoulder GamepadRightShoulder GamepadRightShoulder GamepadRightShoulder 199

The gamepad right shoulder.

GamepadRightThumbstickButton GamepadRightThumbstickButton GamepadRightThumbstickButton GamepadRightThumbstickButton GamepadRightThumbstickButton 210

The gamepad right thumbstick button.

GamepadRightThumbstickDown GamepadRightThumbstickDown GamepadRightThumbstickDown GamepadRightThumbstickDown GamepadRightThumbstickDown 216

The gamepad right thumbstick down.

GamepadRightThumbstickLeft GamepadRightThumbstickLeft GamepadRightThumbstickLeft GamepadRightThumbstickLeft GamepadRightThumbstickLeft 218

The gamepad right thumbstick left.

GamepadRightThumbstickRight GamepadRightThumbstickRight GamepadRightThumbstickRight GamepadRightThumbstickRight GamepadRightThumbstickRight 217

The gamepad right thumbstick right.

GamepadRightThumbstickUp GamepadRightThumbstickUp GamepadRightThumbstickUp GamepadRightThumbstickUp GamepadRightThumbstickUp 215

The gamepad right thumbstick up.

GamepadRightTrigger GamepadRightTrigger GamepadRightTrigger GamepadRightTrigger GamepadRightTrigger 202

The gamepad right trigger.

GamepadView GamepadView GamepadView GamepadView GamepadView 208

The gamepad view button.

GamepadX GamepadX GamepadX GamepadX GamepadX 197

The gamepad X button.

GamepadY GamepadY GamepadY GamepadY GamepadY 198

The gamepad Y button.

GoBack GoBack GoBack GoBack GoBack 166

The go back key.

GoForward GoForward GoForward GoForward GoForward 167

The go forward key.

GoHome GoHome GoHome GoHome GoHome 172

The go home key.

H H H H H 72

The letter "H" key.

Hangul Hangul Hangul Hangul Hangul 21

The Hangul symbol key-shift button.

Hanja Hanja Hanja Hanja Hanja 25

The Hanja symbol key shift button.

Help Help Help Help Help 47

The Help key or button.

Home Home Home Home Home 36

The Home key.

I I I I I 73

The letter "I" key.

Insert Insert Insert Insert Insert 45

The Insert key.

J J J J J 74

The letter "J" key.

Junja Junja Junja Junja Junja 23

The Junja symbol key-shift button.

K K K K K 75

The letter "K" key.

Kana Kana Kana Kana Kana 21

The Kana symbol key-shift button


Kanji Kanji Kanji Kanji Kanji 25

The Kanji symbol key-shift button.

L L L L L 76

The letter "L" key.

Left Left Left Left Left 37

The Left Arrow key.

LeftButton LeftButton LeftButton LeftButton LeftButton 1

The left mouse button.

LeftControl LeftControl LeftControl LeftControl LeftControl 162

The left Ctrl key.

LeftMenu LeftMenu LeftMenu LeftMenu LeftMenu 164

The left menu key.

LeftShift LeftShift LeftShift LeftShift LeftShift 160

The left Shift key.

LeftWindows LeftWindows LeftWindows LeftWindows LeftWindows 91

The left Windows key.

M M M M M 77

The letter "M" key.

Menu Menu Menu Menu Menu 18

The menu key or button.

MiddleButton MiddleButton MiddleButton MiddleButton MiddleButton 4

The middle mouse button.

ModeChange ModeChange ModeChange ModeChange ModeChange 31

The mode change key.

Multiply Multiply Multiply Multiply Multiply 106

The multiply (*) operation key as located on a numeric pad.

N N N N N 78

The letter "N" key.

NavigationAccept NavigationAccept NavigationAccept NavigationAccept NavigationAccept 142

The navigation accept button.

NavigationCancel NavigationCancel NavigationCancel NavigationCancel NavigationCancel 143

The navigation cancel button.

NavigationDown NavigationDown NavigationDown NavigationDown NavigationDown 139

The navigation down button.

NavigationLeft NavigationLeft NavigationLeft NavigationLeft NavigationLeft 140

The navigation left button.

NavigationMenu NavigationMenu NavigationMenu NavigationMenu NavigationMenu 137

The navigation menu button.

NavigationRight NavigationRight NavigationRight NavigationRight NavigationRight 141

The navigation right button.

NavigationUp NavigationUp NavigationUp NavigationUp NavigationUp 138

The navigation up button.

NavigationView NavigationView NavigationView NavigationView NavigationView 136

The navigation up button.

NonConvert NonConvert NonConvert NonConvert NonConvert 29

The nonconvert button or key.

None None None None None 0

No virtual key value.

Number0 Number0 Number0 Number0 Number0 48

The number "0" key.

Number1 Number1 Number1 Number1 Number1 49

The number "1" key.

Number2 Number2 Number2 Number2 Number2 50

The number "2" key.

Number3 Number3 Number3 Number3 Number3 51

The number "3" key.

Number4 Number4 Number4 Number4 Number4 52

The number "4" key.

Number5 Number5 Number5 Number5 Number5 53

The number "5" key.

Number6 Number6 Number6 Number6 Number6 54

The number "6" key.

Number7 Number7 Number7 Number7 Number7 55

The number "7" key.

Number8 Number8 Number8 Number8 Number8 56

The number "8" key.

Number9 Number9 Number9 Number9 Number9 57

The number "9" key.

NumberKeyLock NumberKeyLock NumberKeyLock NumberKeyLock NumberKeyLock 144

The Num Lock key.

NumberPad0 NumberPad0 NumberPad0 NumberPad0 NumberPad0 96

The number "0" key as located on a numeric pad.

NumberPad1 NumberPad1 NumberPad1 NumberPad1 NumberPad1 97

The number "1" key as located on a numeric pad.

NumberPad2 NumberPad2 NumberPad2 NumberPad2 NumberPad2 98

The number "2" key as located on a numeric pad.

NumberPad3 NumberPad3 NumberPad3 NumberPad3 NumberPad3 99

The number "3" key as located on a numeric pad.

NumberPad4 NumberPad4 NumberPad4 NumberPad4 NumberPad4 100

The number "4" key as located on a numeric pad.

NumberPad5 NumberPad5 NumberPad5 NumberPad5 NumberPad5 101

The number "5" key as located on a numeric pad.

NumberPad6 NumberPad6 NumberPad6 NumberPad6 NumberPad6 102

The number "6" key as located on a numeric pad.

NumberPad7 NumberPad7 NumberPad7 NumberPad7 NumberPad7 103

The number "7" key as located on a numeric pad.

NumberPad8 NumberPad8 NumberPad8 NumberPad8 NumberPad8 104

The number "8" key as located on a numeric pad.

NumberPad9 NumberPad9 NumberPad9 NumberPad9 NumberPad9 105

The number "9" key as located on a numeric pad.

O O O O O 79

The letter "O" key.

P P P P P 80

The letter "P" key.

PageDown PageDown PageDown PageDown PageDown 34

The Page Down key.

PageUp PageUp PageUp PageUp PageUp 33

The Page Up key.

Pause Pause Pause Pause Pause 19

The Pause key or button.

Print Print Print Print Print 42

The Print key or button.

Q Q Q Q Q 81

The letter "Q" key.

R R R R R 82

The letter "R" key.

Refresh Refresh Refresh Refresh Refresh 168

The refresh key.

Right Right Right Right Right 39

The Right Arrow key.

RightButton RightButton RightButton RightButton RightButton 2

The right mouse button.

RightControl RightControl RightControl RightControl RightControl 163

The right Ctrl key.

RightMenu RightMenu RightMenu RightMenu RightMenu 165

The right menu key.

RightShift RightShift RightShift RightShift RightShift 161

The right Shift key.

RightWindows RightWindows RightWindows RightWindows RightWindows 92

The right Windows key.

S S S S S 83

The letter "S" key.

Scroll Scroll Scroll Scroll Scroll 145

The Scroll Lock (ScrLk) key.


The search key.

Select Select Select Select Select 41

The Select key or button.

Separator Separator Separator Separator Separator 108

The separator key as located on a numeric pad.

Shift Shift Shift Shift Shift 16

The Shift key. This is the general Shift case, applicable to key layouts with only one Shift key or that do not need to differentiate between left Shift and right Shift keystrokes.

Sleep Sleep Sleep Sleep Sleep 95

The sleep key or button.

Snapshot Snapshot Snapshot Snapshot Snapshot 44

The snapshot key or button.

Space Space Space Space Space 32

The Spacebar key or button.

Stop Stop Stop Stop Stop 169

The stop key.

Subtract Subtract Subtract Subtract Subtract 109

The subtract (-) operation key as located on a numeric pad.

T T T T T 84

The letter "T" key.

Tab Tab Tab Tab Tab 9

The Tab key.

U U U U U 85

The letter "U" key.

Up Up Up Up Up 38

The Up Arrow key.

V V V V V 86

The letter "V" key.

W W W W W 87

The letter "W" key.

X X X X X 88

The letter "X" key.

XButton1 XButton1 XButton1 XButton1 XButton1 5

An additional "extended" device key or button (for example, an additional mouse button).

XButton2 XButton2 XButton2 XButton2 XButton2 6

An additional "extended" device key or button (for example, an additional mouse button).

Y Y Y Y Y 89

The letter "Y" key.

Z Z Z Z Z 90

The letter "Z" key.