1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
ash / public / mojom / accelerator_keys.mojom [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module ash.mojom;
// Represents the v-key (main key) values of the accelerator. Values are
// based off of ui/events/keycodes/keyboard_codes_posix.h.
enum VKey {
kCancel = 0x03,
kBack = 0x08,
kTab = 0x09,
kBackTab = 0x0A,
kClear = 0x0C,
kReturn = 0x0D,
kShift = 0x10,
kControl = 0x11,
kMenu = 0x12,
kPause = 0x13,
kCapital = 0x14,
kKana = 0x15,
kHangul = 0x15,
kPaste = 0x16,
kJunja = 0x17,
kFinal = 0x18,
kHanja = 0x19,
kKanji = 0x19,
kEscape = 0x1B,
kConvert = 0x1C,
kNonConvert = 0x1D,
kAccept = 0x1E,
kModeChange = 0x1F,
kSpace = 0x20,
kPrior = 0x21,
kNext = 0x22,
kEnd = 0x23,
kHome = 0x24,
kLeft = 0x25,
kUp = 0x26,
kRight = 0x27,
kDown = 0x28,
kSelect = 0x29,
kPrint = 0x2A,
kExecute = 0x2B,
kSnapshot = 0x2C, // Print Screen / SysRq
kInsert = 0x2D,
kDelete = 0x2E,
kHelp = 0x2F,
kNum0 = 0x30,
kNum1 = 0x31,
kNum2 = 0x32,
kNum3 = 0x33,
kNum4 = 0x34,
kNum5 = 0x35,
kNum6 = 0x36,
kNum7 = 0x37,
kNum8 = 0x38,
kNum9 = 0x39,
kKeyA = 0x41,
kKeyB = 0x42,
kKeyC = 0x43,
kKeyD = 0x44,
kKeyE = 0x45,
kKeyF = 0x46,
kKeyG = 0x47,
kKeyH = 0x48,
kKeyI = 0x49,
kKeyJ = 0x4A,
kKeyK = 0x4B,
kKeyL = 0x4C,
kKeyM = 0x4D,
kKeyN = 0x4E,
kKeyO = 0x4F,
kKeyP = 0x50,
kKeyQ = 0x51,
kKeyR = 0x52,
kKeyS = 0x53,
kKeyT = 0x54,
kKeyU = 0x55,
kKeyV = 0x56,
kKeyW = 0x57,
kKeyX = 0x58,
kKeyY = 0x59,
kKeyZ = 0x5A,
kLWin = 0x5B,
kCommand = kLWin, // Provide the Mac name for convenience.
kRWin = 0x5C,
kApps = 0x5D,
kSleep = 0x5F,
kNumpad0 = 0x60,
kNumpad1 = 0x61,
kNumpad2 = 0x62,
kNumpad3 = 0x63,
kNumpad4 = 0x64,
kNumpad5 = 0x65,
kNumpad6 = 0x66,
kNumpad7 = 0x67,
kNumpad8 = 0x68,
kNumpad9 = 0x69,
kMultiply = 0x6A,
kAdd = 0x6B,
kSeparator = 0x6C,
kSubtract = 0x6D,
kDecimal = 0x6E,
kDivide = 0x6F,
kF1 = 0x70,
kF2 = 0x71,
kF3 = 0x72,
kF4 = 0x73,
kF5 = 0x74,
kF6 = 0x75,
kF7 = 0x76,
kF8 = 0x77,
kF9 = 0x78,
kF10 = 0x79,
kF11 = 0x7A,
kF12 = 0x7B,
kF13 = 0x7C,
kF14 = 0x7D,
kF15 = 0x7E,
kF16 = 0x7F,
kF17 = 0x80,
kF18 = 0x81,
kF19 = 0x82,
kF20 = 0x83,
kF21 = 0x84,
kF22 = 0x85,
kF23 = 0x86,
kF24 = 0x87,
kNumLock = 0x90,
kScroll = 0x91,
kLShift = 0xA0,
kRShift = 0xA1,
kLControl = 0xA2,
kRControl = 0xA3,
kLMenu = 0xA4,
kRMenu = 0xA5,
kBrowserBack = 0xA6,
kBrowserForward = 0xA7,
kBrowserRefresh = 0xA8,
kBrowserStop = 0xA9,
kBrowserSearch = 0xAA,
kBrowserFavorites = 0xAB,
kBrowserHome = 0xAC,
kVolumeMute = 0xAD,
kVolumeDown = 0xAE,
kVolumeUp = 0xAF,
kMediaNextTrack = 0xB0,
kMediaPrevTrack = 0xB1,
kMediaStop = 0xB2,
kMediaPlayPause = 0xB3,
kMediaLaunchMail = 0xB4,
kMediaLaunchMediaSelect = 0xB5,
kMediaLaunchApp1= 0xB6,
kMediaLaunchApp2 = 0xB7,
kOem1 = 0xBA,
kOemPlus = 0xBB,
kOemComma = 0xBC,
kOemMinus = 0xBD,
kOemPeriod = 0xBE,
kOem2 = 0xBF,
kOem3 = 0xC0,
kOem4 = 0xDB,
kOem5 = 0xDC,
kOem6 = 0xDD,
kOem7 = 0xDE,
kOem8 = 0xDF,
kOem102 = 0xE2,
kOem103 = 0xE3, // GTV KEYCODE_MEDIA_REWIND
kOem104 = 0xE4, // GTV KEYCODE_MEDIA_FAST_FORWARD
kProcessKey = 0xE5,
kPacket = 0xE7,
kOemAttn = 0xF0, // JIS DomKey::ALPHANUMERIC
kOemFinish = 0xF1, // JIS DomKey::KATAKANA
kOemCopy = 0xF2, // JIS DomKey::HIRAGANA
kDbeSbcsChar = 0xF3, // JIS DomKey::HANKAKU
kDbeDbcsChar = 0xF4, // JIS DomKey::ZENKAKU
kOemBacktab = 0xF5, // JIS DomKey::ROMAJI
kAttn = 0xF6, // DomKey::ATTN or JIS DomKey::KANA_MODE
kCrsel = 0xF7,
kExsel = 0xF8,
kEreof = 0xF9,
kPlay = 0xFA,
kZoom = 0xFB,
kNoName = 0xFC,
kPA1 = 0xFD,
kOemClear = 0xFE,
kFunction = 0xFF,
kQuickInsert = 0x100,
kAccessibility = 0x101,
kDoNotDisturb = 0x102,
kUnknown = 0,
// POSIX specific VKEYs. Note that as of Windows SDK 7.1, 0x97-9F, 0xD8-DA,
// and 0xE8 are unassigned.
kWlan = 0x97,
kPower = 0x98,
kAssistant = 0x99,
kSettings = 0x9A,
kPrivacyScreenToggle = 0x9B,
kMicrophoneMuteToggle = 0x9F,
kBrightnessDown = 0xD8,
kBrightnessUp = 0xD9,
kKbdBrightnessToggle = 0xB8,
kKbdBrightnessDown = 0xDA,
kKbdBrightnessUp = 0xE8,
// Windows does not have a specific key code for AltGr. We use the unused 0xE1
// (VK_OEM_AX) code to represent AltGr, matching the behaviour of Firefox on
// Linux.
kAltGr = 0xE1,
// Windows does not have a specific key code for Compose. We use the unused
// 0xE6 (VK_ICO_CLEAR) code to represent Compose.
kCompose = 0xE6,
// Windows does not have specific key codes for Media Play and Media Pause. We
// use the unused 0xE9 (VK_OEM_RESET) and 0xEA (VK_OEM_JUMP) codes to
// represent them.
kMediaPlay = 0xE9,
kMediaPause = 0xEA,
kNew = 0xEB,
kClose = 0xEC,
kEmojiPicker = 0xED,
kDictate = 0xEE,
kAllApplications = 0xEF,
// The following values are used to be able to recognize button events within
// ChromeOS. These have no functionality by default.
kButton0 = 0xFF00,
kButton1 = 0xFF01,
kButton2 = 0xFF02,
kButton3 = 0xFF03,
kButton4 = 0xFF04,
kButton5 = 0xFF05,
kButton6 = 0xFF06,
kButton7 = 0xFF07,
kButton8 = 0xFF08,
kButton9 = 0xFF09,
kButtonA = 0xFF0A,
kButtonB = 0xFF0B,
kButtonC = 0xFF0C,
kButtonX = 0xFF0D,
kButtonY = 0xFF0E,
kButtonZ = 0xFF0F,
};