inset_services/keyboard_key.rs
1//! Flutter counterpart: `services/keyboard_key.g.dart`.
2//!
3//! Transcribed from that file, which Flutter itself generates from
4//! `dev/tools/gen_keycodes`. The key constants and the four tables below are
5//! machine-written; edit the generator, not this file.
6
7use std::collections::HashSet;
8use std::fmt::{self, Debug};
9
10/// A base class for all keyboard key types.
11///
12/// See also:
13///
14/// * [`PhysicalKeyboardKey`], a type with constants that describe the keys that
15/// are returned from `RawKeyEvent.physicalKey`.
16/// * [`LogicalKeyboardKey`], a type with constants that describe the keys that
17/// are returned from `RawKeyEvent.logicalKey`.
18pub trait KeyboardKey: Copy + Eq + Debug {}
19
20/// A type with constants that describe the keys that are returned from
21/// `RawKeyEvent.logicalKey`.
22///
23/// These represent *logical* keys, which are keys which are interpreted in the
24/// context of any modifiers, modes, or keyboard layouts which may be in effect.
25///
26/// This is contrast to [`PhysicalKeyboardKey`], which represents a physical key
27/// in a particular location on the keyboard, without regard for the modifier
28/// state, mode, or keyboard layout.
29///
30/// As an example, if you wanted to implement an app where the "Q" key "quit"
31/// something, you'd want to look at the logical key to detect this, since you
32/// would like to have it match the key with "Q" on it, instead of always
33/// looking for "the key next to the TAB key", since on a French keyboard,
34/// the key next to the TAB key has an "A" on it.
35///
36/// Conversely, if you wanted a game where the key next to the CAPS LOCK (the
37/// "A" key on a QWERTY keyboard) moved the player to the left, you'd want to
38/// look at the physical key to make sure that regardless of the character the
39/// key produces, you got the key that is in that location on the keyboard.
40#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
41pub struct LogicalKeyboardKey {
42 /// A unique code representing this key.
43 ///
44 /// This is an opaque code. It should not be unpacked to derive information
45 /// from it, as the representation of the code could change at any time.
46 pub key_id: u64,
47}
48
49impl KeyboardKey for LogicalKeyboardKey {}
50
51impl LogicalKeyboardKey {
52 /// Creates a new [`LogicalKeyboardKey`] for a key ID.
53 pub const fn new(key_id: u64) -> LogicalKeyboardKey {
54 LogicalKeyboardKey { key_id }
55 }
56
57 /// Returns the bits that are not included in [`VALUE_MASK`](Self::VALUE_MASK),
58 /// shifted to the right.
59 ///
60 /// For example, if the input is 0x12abcdabcd, then the result is 0x12.
61 fn non_value_bits(n: u64) -> u64 {
62 const VALUE_MASK_WIDTH: u32 = 32;
63 // Dart limits the non-value bits to what a JavaScript number can hold.
64 const MAX_SAFE_INTEGER_WIDTH: u32 = 52;
65 const NON_VALUE_MASK: u64 = (1 << (MAX_SAFE_INTEGER_WIDTH - VALUE_MASK_WIDTH)) - 1;
66 (n >> VALUE_MASK_WIDTH) & NON_VALUE_MASK
67 }
68
69 fn unicode_key_label(key_id: u64) -> Option<String> {
70 if LogicalKeyboardKey::non_value_bits(key_id) == 0
71 && let Ok(code_point) = u32::try_from(key_id)
72 && let Some(character) = char::from_u32(code_point)
73 {
74 return Some(character.to_uppercase().to_string());
75 }
76 None
77 }
78
79 /// A description representing the character produced by a `RawKeyEvent`.
80 ///
81 /// This value is useful for providing readable strings for keys or keyboard
82 /// shortcuts. Do not use this value to compare equality of keys; compare
83 /// [`key_id`](Self::key_id) instead.
84 ///
85 /// For printable keys, this is usually the printable character in upper case
86 /// ignoring modifiers or combining keys, such as 'A', '1', or '/'. This
87 /// might also return accented letters (such as 'Ù') for keys labeled as so,
88 /// but not if such character is a result from preceding combining keys ('`̀'
89 /// followed by key U).
90 ///
91 /// For other keys, [`key_label`](Self::key_label) looks up the full key name
92 /// from a predefined map, such as 'F1', 'Shift Left', or 'Media Down'. This
93 /// value is an empty string if there's no key label data for a key.
94 pub fn key_label(&self) -> String {
95 LogicalKeyboardKey::unicode_key_label(self.key_id)
96 .or_else(|| key_label_of(self.key_id).map(str::to_owned))
97 .unwrap_or_default()
98 }
99
100 /// The debug string to print for this keyboard key, which will be `None` in
101 /// release mode.
102 ///
103 /// For printable keys, this is usually a more descriptive name related to
104 /// [`key_label`](Self::key_label), such as 'Key A', 'Digit 1', 'Backslash'.
105 /// This might also return accented letters (such as 'Key Ù') for keys
106 /// labeled as so.
107 ///
108 /// For other keys, this looks up the full key name from a predefined map (the
109 /// same value as [`key_label`](Self::key_label)), such as 'F1', 'Shift Left',
110 /// or 'Media Down'. If there's no key label data for a key, this returns a
111 /// name that explains the ID (such as 'Key with ID 0x00100012345').
112 pub fn debug_name(&self) -> Option<String> {
113 if !cfg!(debug_assertions) {
114 return None;
115 }
116 if let Some(label) = key_label_of(self.key_id) {
117 return Some(label.to_owned());
118 }
119 if let Some(label) = LogicalKeyboardKey::unicode_key_label(self.key_id) {
120 return Some(format!("Key {label}"));
121 }
122 Some(format!("Key with ID 0x{:011x}", self.key_id))
123 }
124
125 /// Returns the [`LogicalKeyboardKey`] constant that matches the given ID, or
126 /// `None`, if not found.
127 pub fn find_key_by_key_id(key_id: u64) -> Option<LogicalKeyboardKey> {
128 KNOWN_LOGICAL_KEYS
129 .binary_search_by_key(&key_id, |key| key.key_id)
130 .ok()
131 .map(|index| KNOWN_LOGICAL_KEYS[index])
132 }
133
134 /// Returns true if the given label represents a Unicode control character.
135 ///
136 /// Examples of control characters are characters like "U+000A LINE FEED (LF)"
137 /// or "U+001B ESCAPE (ESC)".
138 ///
139 /// See <https://en.wikipedia.org/wiki/Unicode_control_characters> for more
140 /// information.
141 pub fn is_control_character(label: &str) -> bool {
142 let mut characters = label.chars();
143 let (Some(code_unit), None) = (characters.next(), characters.next()) else {
144 return false;
145 };
146 let code_unit = u32::from(code_unit);
147 code_unit <= 0x1f || (0x7f..=0x9f).contains(&code_unit)
148 }
149
150 /// Returns true if the [`key_id`](Self::key_id) of this object is one that is
151 /// auto-generated by Flutter.
152 ///
153 /// Auto-generated key IDs are generated in response to platform key codes
154 /// which Flutter doesn't recognize, and their IDs shouldn't be used in a
155 /// persistent way.
156 ///
157 /// Auto-generated IDs should be a rare occurrence: Flutter supports most keys.
158 ///
159 /// Keys that generate Unicode characters (even if unknown to Flutter) will
160 /// not return true for [`is_autogenerated`](Self::is_autogenerated), since
161 /// they will be assigned a Unicode-based code that will remain stable.
162 pub fn is_autogenerated(&self) -> bool {
163 (self.key_id & LogicalKeyboardKey::PLANE_MASK)
164 >= LogicalKeyboardKey::START_OF_PLATFORM_PLANES
165 }
166
167 /// Returns a set of pseudo-key synonyms for this key.
168 ///
169 /// This allows finding the pseudo-keys that also represent a concrete key
170 /// so that a class with a key map can match pseudo-keys as well as the actual
171 /// generated keys.
172 ///
173 /// Pseudo-keys returned in the set are typically used to represent keys which
174 /// appear in multiple places on the keyboard, such as the
175 /// [`SHIFT`](Self::SHIFT), [`ALT`](Self::ALT), [`CONTROL`](Self::CONTROL), and
176 /// [`META`](Self::META) keys. Pseudo-keys in the returned set won't ever be
177 /// generated directly, but if a more specific key event is received, then
178 /// this set can be used to find the more general pseudo-key. For example, if
179 /// this is a [`SHIFT_LEFT`](Self::SHIFT_LEFT) key, this accessor will return
180 /// the set `{ shift }`.
181 pub fn synonyms(&self) -> HashSet<LogicalKeyboardKey> {
182 synonyms_of(*self)
183 .unwrap_or_default()
184 .iter()
185 .copied()
186 .collect()
187 }
188
189 /// Takes a set of keys, and returns the same set, but with any keys that have
190 /// synonyms replaced.
191 ///
192 /// It is used, for example, to take sets of keys with members like
193 /// [`CONTROL_RIGHT`](Self::CONTROL_RIGHT) and
194 /// [`CONTROL_LEFT`](Self::CONTROL_LEFT) and convert that set to contain just
195 /// [`CONTROL`](Self::CONTROL), so that the question "is any control key
196 /// down?" can be asked.
197 pub fn collapse_synonyms(input: &HashSet<LogicalKeyboardKey>) -> HashSet<LogicalKeyboardKey> {
198 expand_with(input, synonyms_of)
199 }
200
201 /// Returns the given set with any pseudo-keys expanded into their synonyms.
202 ///
203 /// It is used, for example, to take sets of keys with members like
204 /// [`CONTROL`](Self::CONTROL) and [`SHIFT`](Self::SHIFT) and convert that set
205 /// to contain [`CONTROL_LEFT`](Self::CONTROL_LEFT),
206 /// [`CONTROL_RIGHT`](Self::CONTROL_RIGHT), [`SHIFT_LEFT`](Self::SHIFT_LEFT),
207 /// and [`SHIFT_RIGHT`](Self::SHIFT_RIGHT).
208 pub fn expand_synonyms(input: &HashSet<LogicalKeyboardKey>) -> HashSet<LogicalKeyboardKey> {
209 expand_with(input, reverse_synonyms_of)
210 }
211
212 /// Mask for the 32-bit value portion of the key code.
213 ///
214 /// This is used by platform-specific code to generate Flutter key codes.
215 pub const VALUE_MASK: u64 = 0x000ffffffff;
216
217 /// Mask for the plane prefix portion of the key code.
218 ///
219 /// This is used by platform-specific code to generate Flutter key codes.
220 pub const PLANE_MASK: u64 = 0x0ff00000000;
221
222 /// The plane value for keys which have a Unicode representation.
223 ///
224 /// This is used by platform-specific code to generate Flutter key codes.
225 pub const UNICODE_PLANE: u64 = 0x00000000000;
226
227 /// The plane value for keys defined by Chromium and does not have a Unicode
228 /// representation.
229 ///
230 /// This is used by platform-specific code to generate Flutter key codes.
231 pub const UNPRINTABLE_PLANE: u64 = 0x00100000000;
232
233 /// The plane value for keys defined by Flutter.
234 ///
235 /// This is used by platform-specific code to generate Flutter key codes.
236 pub const FLUTTER_PLANE: u64 = 0x00200000000;
237
238 /// The platform plane with the lowest mask value, beyond which the keys are
239 /// considered autogenerated.
240 ///
241 /// This is used by platform-specific code to generate Flutter key codes.
242 pub const START_OF_PLATFORM_PLANES: u64 = 0x01100000000;
243
244 /// The plane value for the private keys defined by the Android embedding.
245 ///
246 /// This is used by platform-specific code to generate Flutter key codes.
247 pub const ANDROID_PLANE: u64 = 0x01100000000;
248
249 /// The plane value for the private keys defined by the Fuchsia embedding.
250 ///
251 /// This is used by platform-specific code to generate Flutter key codes.
252 pub const FUCHSIA_PLANE: u64 = 0x01200000000;
253
254 /// The plane value for the private keys defined by the iOS embedding.
255 ///
256 /// This is used by platform-specific code to generate Flutter key codes.
257 pub const IOS_PLANE: u64 = 0x01300000000;
258
259 /// The plane value for the private keys defined by the macOS embedding.
260 ///
261 /// This is used by platform-specific code to generate Flutter key codes.
262 pub const MACOS_PLANE: u64 = 0x01400000000;
263
264 /// The plane value for the private keys defined by the Gtk embedding.
265 ///
266 /// This is used by platform-specific code to generate Flutter key codes.
267 pub const GTK_PLANE: u64 = 0x01500000000;
268
269 /// The plane value for the private keys defined by the Windows embedding.
270 ///
271 /// This is used by platform-specific code to generate Flutter key codes.
272 pub const WINDOWS_PLANE: u64 = 0x01600000000;
273
274 /// The plane value for the private keys defined by the Web embedding.
275 ///
276 /// This is used by platform-specific code to generate Flutter key codes.
277 pub const WEB_PLANE: u64 = 0x01700000000;
278
279 /// The plane value for the private keys defined by the GLFW embedding.
280 ///
281 /// This is used by platform-specific code to generate Flutter key codes.
282 pub const GLFW_PLANE: u64 = 0x01800000000;
283
284 /// Represents the logical "Space" key on the keyboard.
285 ///
286 /// See the function `RawKeyEvent.logicalKey` for more information.
287 pub const SPACE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000020);
288
289 /// Represents the logical "Exclamation" key on the keyboard.
290 ///
291 /// See the function `RawKeyEvent.logicalKey` for more information.
292 pub const EXCLAMATION: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000021);
293
294 /// Represents the logical "Quote" key on the keyboard.
295 ///
296 /// See the function `RawKeyEvent.logicalKey` for more information.
297 pub const QUOTE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000022);
298
299 /// Represents the logical "Number Sign" key on the keyboard.
300 ///
301 /// See the function `RawKeyEvent.logicalKey` for more information.
302 pub const NUMBER_SIGN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000023);
303
304 /// Represents the logical "Dollar" key on the keyboard.
305 ///
306 /// See the function `RawKeyEvent.logicalKey` for more information.
307 pub const DOLLAR: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000024);
308
309 /// Represents the logical "Percent" key on the keyboard.
310 ///
311 /// See the function `RawKeyEvent.logicalKey` for more information.
312 pub const PERCENT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000025);
313
314 /// Represents the logical "Ampersand" key on the keyboard.
315 ///
316 /// See the function `RawKeyEvent.logicalKey` for more information.
317 pub const AMPERSAND: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000026);
318
319 /// Represents the logical "Quote Single" key on the keyboard.
320 ///
321 /// See the function `RawKeyEvent.logicalKey` for more information.
322 pub const QUOTE_SINGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000027);
323
324 /// Represents the logical "Parenthesis Left" key on the keyboard.
325 ///
326 /// See the function `RawKeyEvent.logicalKey` for more information.
327 pub const PARENTHESIS_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000028);
328
329 /// Represents the logical "Parenthesis Right" key on the keyboard.
330 ///
331 /// See the function `RawKeyEvent.logicalKey` for more information.
332 pub const PARENTHESIS_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000029);
333
334 /// Represents the logical "Asterisk" key on the keyboard.
335 ///
336 /// See the function `RawKeyEvent.logicalKey` for more information.
337 pub const ASTERISK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000002a);
338
339 /// Represents the logical "Add" key on the keyboard.
340 ///
341 /// See the function `RawKeyEvent.logicalKey` for more information.
342 pub const ADD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000002b);
343
344 /// Represents the logical "Comma" key on the keyboard.
345 ///
346 /// See the function `RawKeyEvent.logicalKey` for more information.
347 pub const COMMA: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000002c);
348
349 /// Represents the logical "Minus" key on the keyboard.
350 ///
351 /// See the function `RawKeyEvent.logicalKey` for more information.
352 pub const MINUS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000002d);
353
354 /// Represents the logical "Period" key on the keyboard.
355 ///
356 /// See the function `RawKeyEvent.logicalKey` for more information.
357 pub const PERIOD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000002e);
358
359 /// Represents the logical "Slash" key on the keyboard.
360 ///
361 /// See the function `RawKeyEvent.logicalKey` for more information.
362 pub const SLASH: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000002f);
363
364 /// Represents the logical "Digit 0" key on the keyboard.
365 ///
366 /// See the function `RawKeyEvent.logicalKey` for more information.
367 pub const DIGIT0: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000030);
368
369 /// Represents the logical "Digit 1" key on the keyboard.
370 ///
371 /// See the function `RawKeyEvent.logicalKey` for more information.
372 pub const DIGIT1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000031);
373
374 /// Represents the logical "Digit 2" key on the keyboard.
375 ///
376 /// See the function `RawKeyEvent.logicalKey` for more information.
377 pub const DIGIT2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000032);
378
379 /// Represents the logical "Digit 3" key on the keyboard.
380 ///
381 /// See the function `RawKeyEvent.logicalKey` for more information.
382 pub const DIGIT3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000033);
383
384 /// Represents the logical "Digit 4" key on the keyboard.
385 ///
386 /// See the function `RawKeyEvent.logicalKey` for more information.
387 pub const DIGIT4: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000034);
388
389 /// Represents the logical "Digit 5" key on the keyboard.
390 ///
391 /// See the function `RawKeyEvent.logicalKey` for more information.
392 pub const DIGIT5: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000035);
393
394 /// Represents the logical "Digit 6" key on the keyboard.
395 ///
396 /// See the function `RawKeyEvent.logicalKey` for more information.
397 pub const DIGIT6: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000036);
398
399 /// Represents the logical "Digit 7" key on the keyboard.
400 ///
401 /// See the function `RawKeyEvent.logicalKey` for more information.
402 pub const DIGIT7: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000037);
403
404 /// Represents the logical "Digit 8" key on the keyboard.
405 ///
406 /// See the function `RawKeyEvent.logicalKey` for more information.
407 pub const DIGIT8: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000038);
408
409 /// Represents the logical "Digit 9" key on the keyboard.
410 ///
411 /// See the function `RawKeyEvent.logicalKey` for more information.
412 pub const DIGIT9: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000039);
413
414 /// Represents the logical "Colon" key on the keyboard.
415 ///
416 /// See the function `RawKeyEvent.logicalKey` for more information.
417 pub const COLON: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000003a);
418
419 /// Represents the logical "Semicolon" key on the keyboard.
420 ///
421 /// See the function `RawKeyEvent.logicalKey` for more information.
422 pub const SEMICOLON: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000003b);
423
424 /// Represents the logical "Less" key on the keyboard.
425 ///
426 /// See the function `RawKeyEvent.logicalKey` for more information.
427 pub const LESS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000003c);
428
429 /// Represents the logical "Equal" key on the keyboard.
430 ///
431 /// See the function `RawKeyEvent.logicalKey` for more information.
432 pub const EQUAL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000003d);
433
434 /// Represents the logical "Greater" key on the keyboard.
435 ///
436 /// See the function `RawKeyEvent.logicalKey` for more information.
437 pub const GREATER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000003e);
438
439 /// Represents the logical "Question" key on the keyboard.
440 ///
441 /// See the function `RawKeyEvent.logicalKey` for more information.
442 pub const QUESTION: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000003f);
443
444 /// Represents the logical "At" key on the keyboard.
445 ///
446 /// See the function `RawKeyEvent.logicalKey` for more information.
447 pub const AT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000040);
448
449 /// Represents the logical "Bracket Left" key on the keyboard.
450 ///
451 /// See the function `RawKeyEvent.logicalKey` for more information.
452 pub const BRACKET_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000005b);
453
454 /// Represents the logical "Backslash" key on the keyboard.
455 ///
456 /// See the function `RawKeyEvent.logicalKey` for more information.
457 pub const BACKSLASH: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000005c);
458
459 /// Represents the logical "Bracket Right" key on the keyboard.
460 ///
461 /// See the function `RawKeyEvent.logicalKey` for more information.
462 pub const BRACKET_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000005d);
463
464 /// Represents the logical "Caret" key on the keyboard.
465 ///
466 /// See the function `RawKeyEvent.logicalKey` for more information.
467 pub const CARET: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000005e);
468
469 /// Represents the logical "Underscore" key on the keyboard.
470 ///
471 /// See the function `RawKeyEvent.logicalKey` for more information.
472 pub const UNDERSCORE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000005f);
473
474 /// Represents the logical "Backquote" key on the keyboard.
475 ///
476 /// See the function `RawKeyEvent.logicalKey` for more information.
477 pub const BACKQUOTE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000060);
478
479 /// Represents the logical "Key A" key on the keyboard.
480 ///
481 /// See the function `RawKeyEvent.logicalKey` for more information.
482 pub const KEY_A: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000061);
483
484 /// Represents the logical "Key B" key on the keyboard.
485 ///
486 /// See the function `RawKeyEvent.logicalKey` for more information.
487 pub const KEY_B: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000062);
488
489 /// Represents the logical "Key C" key on the keyboard.
490 ///
491 /// See the function `RawKeyEvent.logicalKey` for more information.
492 pub const KEY_C: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000063);
493
494 /// Represents the logical "Key D" key on the keyboard.
495 ///
496 /// See the function `RawKeyEvent.logicalKey` for more information.
497 pub const KEY_D: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000064);
498
499 /// Represents the logical "Key E" key on the keyboard.
500 ///
501 /// See the function `RawKeyEvent.logicalKey` for more information.
502 pub const KEY_E: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000065);
503
504 /// Represents the logical "Key F" key on the keyboard.
505 ///
506 /// See the function `RawKeyEvent.logicalKey` for more information.
507 pub const KEY_F: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000066);
508
509 /// Represents the logical "Key G" key on the keyboard.
510 ///
511 /// See the function `RawKeyEvent.logicalKey` for more information.
512 pub const KEY_G: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000067);
513
514 /// Represents the logical "Key H" key on the keyboard.
515 ///
516 /// See the function `RawKeyEvent.logicalKey` for more information.
517 pub const KEY_H: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000068);
518
519 /// Represents the logical "Key I" key on the keyboard.
520 ///
521 /// See the function `RawKeyEvent.logicalKey` for more information.
522 pub const KEY_I: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000069);
523
524 /// Represents the logical "Key J" key on the keyboard.
525 ///
526 /// See the function `RawKeyEvent.logicalKey` for more information.
527 pub const KEY_J: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000006a);
528
529 /// Represents the logical "Key K" key on the keyboard.
530 ///
531 /// See the function `RawKeyEvent.logicalKey` for more information.
532 pub const KEY_K: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000006b);
533
534 /// Represents the logical "Key L" key on the keyboard.
535 ///
536 /// See the function `RawKeyEvent.logicalKey` for more information.
537 pub const KEY_L: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000006c);
538
539 /// Represents the logical "Key M" key on the keyboard.
540 ///
541 /// See the function `RawKeyEvent.logicalKey` for more information.
542 pub const KEY_M: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000006d);
543
544 /// Represents the logical "Key N" key on the keyboard.
545 ///
546 /// See the function `RawKeyEvent.logicalKey` for more information.
547 pub const KEY_N: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000006e);
548
549 /// Represents the logical "Key O" key on the keyboard.
550 ///
551 /// See the function `RawKeyEvent.logicalKey` for more information.
552 pub const KEY_O: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000006f);
553
554 /// Represents the logical "Key P" key on the keyboard.
555 ///
556 /// See the function `RawKeyEvent.logicalKey` for more information.
557 pub const KEY_P: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000070);
558
559 /// Represents the logical "Key Q" key on the keyboard.
560 ///
561 /// See the function `RawKeyEvent.logicalKey` for more information.
562 pub const KEY_Q: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000071);
563
564 /// Represents the logical "Key R" key on the keyboard.
565 ///
566 /// See the function `RawKeyEvent.logicalKey` for more information.
567 pub const KEY_R: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000072);
568
569 /// Represents the logical "Key S" key on the keyboard.
570 ///
571 /// See the function `RawKeyEvent.logicalKey` for more information.
572 pub const KEY_S: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000073);
573
574 /// Represents the logical "Key T" key on the keyboard.
575 ///
576 /// See the function `RawKeyEvent.logicalKey` for more information.
577 pub const KEY_T: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000074);
578
579 /// Represents the logical "Key U" key on the keyboard.
580 ///
581 /// See the function `RawKeyEvent.logicalKey` for more information.
582 pub const KEY_U: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000075);
583
584 /// Represents the logical "Key V" key on the keyboard.
585 ///
586 /// See the function `RawKeyEvent.logicalKey` for more information.
587 pub const KEY_V: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000076);
588
589 /// Represents the logical "Key W" key on the keyboard.
590 ///
591 /// See the function `RawKeyEvent.logicalKey` for more information.
592 pub const KEY_W: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000077);
593
594 /// Represents the logical "Key X" key on the keyboard.
595 ///
596 /// See the function `RawKeyEvent.logicalKey` for more information.
597 pub const KEY_X: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000078);
598
599 /// Represents the logical "Key Y" key on the keyboard.
600 ///
601 /// See the function `RawKeyEvent.logicalKey` for more information.
602 pub const KEY_Y: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00000000079);
603
604 /// Represents the logical "Key Z" key on the keyboard.
605 ///
606 /// See the function `RawKeyEvent.logicalKey` for more information.
607 pub const KEY_Z: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000007a);
608
609 /// Represents the logical "Brace Left" key on the keyboard.
610 ///
611 /// See the function `RawKeyEvent.logicalKey` for more information.
612 pub const BRACE_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000007b);
613
614 /// Represents the logical "Bar" key on the keyboard.
615 ///
616 /// See the function `RawKeyEvent.logicalKey` for more information.
617 pub const BAR: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000007c);
618
619 /// Represents the logical "Brace Right" key on the keyboard.
620 ///
621 /// See the function `RawKeyEvent.logicalKey` for more information.
622 pub const BRACE_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000007d);
623
624 /// Represents the logical "Tilde" key on the keyboard.
625 ///
626 /// See the function `RawKeyEvent.logicalKey` for more information.
627 pub const TILDE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0000000007e);
628
629 /// Represents the logical "Unidentified" key on the keyboard.
630 ///
631 /// See the function `RawKeyEvent.logicalKey` for more information.
632 pub const UNIDENTIFIED: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000001);
633
634 /// Represents the logical "Backspace" key on the keyboard.
635 ///
636 /// See the function `RawKeyEvent.logicalKey` for more information.
637 pub const BACKSPACE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000008);
638
639 /// Represents the logical "Tab" key on the keyboard.
640 ///
641 /// See the function `RawKeyEvent.logicalKey` for more information.
642 pub const TAB: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000009);
643
644 /// Represents the logical "Enter" key on the keyboard.
645 ///
646 /// See the function `RawKeyEvent.logicalKey` for more information.
647 pub const ENTER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000000d);
648
649 /// Represents the logical "Escape" key on the keyboard.
650 ///
651 /// See the function `RawKeyEvent.logicalKey` for more information.
652 pub const ESCAPE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000001b);
653
654 /// Represents the logical "Delete" key on the keyboard.
655 ///
656 /// See the function `RawKeyEvent.logicalKey` for more information.
657 pub const DELETE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000007f);
658
659 /// Represents the logical "Accel" key on the keyboard.
660 ///
661 /// See the function `RawKeyEvent.logicalKey` for more information.
662 pub const ACCEL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000101);
663
664 /// Represents the logical "Alt Graph" key on the keyboard.
665 ///
666 /// See the function `RawKeyEvent.logicalKey` for more information.
667 pub const ALT_GRAPH: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000103);
668
669 /// Represents the logical "Caps Lock" key on the keyboard.
670 ///
671 /// See the function `RawKeyEvent.logicalKey` for more information.
672 pub const CAPS_LOCK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000104);
673
674 /// Represents the logical "Fn" key on the keyboard.
675 ///
676 /// See the function `RawKeyEvent.logicalKey` for more information.
677 pub const FN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000106);
678
679 /// Represents the logical "Fn Lock" key on the keyboard.
680 ///
681 /// See the function `RawKeyEvent.logicalKey` for more information.
682 pub const FN_LOCK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000107);
683
684 /// Represents the logical "Hyper" key on the keyboard.
685 ///
686 /// See the function `RawKeyEvent.logicalKey` for more information.
687 pub const HYPER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000108);
688
689 /// Represents the logical "Num Lock" key on the keyboard.
690 ///
691 /// See the function `RawKeyEvent.logicalKey` for more information.
692 pub const NUM_LOCK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000010a);
693
694 /// Represents the logical "Scroll Lock" key on the keyboard.
695 ///
696 /// See the function `RawKeyEvent.logicalKey` for more information.
697 pub const SCROLL_LOCK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000010c);
698
699 /// Represents the logical "Super" key on the keyboard.
700 ///
701 /// See the function `RawKeyEvent.logicalKey` for more information.
702 pub const SUPER_KEY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000010e);
703
704 /// Represents the logical "Symbol" key on the keyboard.
705 ///
706 /// See the function `RawKeyEvent.logicalKey` for more information.
707 pub const SYMBOL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000010f);
708
709 /// Represents the logical "Symbol Lock" key on the keyboard.
710 ///
711 /// See the function `RawKeyEvent.logicalKey` for more information.
712 pub const SYMBOL_LOCK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000110);
713
714 /// Represents the logical "Shift Level 5" key on the keyboard.
715 ///
716 /// See the function `RawKeyEvent.logicalKey` for more information.
717 pub const SHIFT_LEVEL5: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000111);
718
719 /// Represents the logical "Arrow Down" key on the keyboard.
720 ///
721 /// See the function `RawKeyEvent.logicalKey` for more information.
722 pub const ARROW_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000301);
723
724 /// Represents the logical "Arrow Left" key on the keyboard.
725 ///
726 /// See the function `RawKeyEvent.logicalKey` for more information.
727 pub const ARROW_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000302);
728
729 /// Represents the logical "Arrow Right" key on the keyboard.
730 ///
731 /// See the function `RawKeyEvent.logicalKey` for more information.
732 pub const ARROW_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000303);
733
734 /// Represents the logical "Arrow Up" key on the keyboard.
735 ///
736 /// See the function `RawKeyEvent.logicalKey` for more information.
737 pub const ARROW_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000304);
738
739 /// Represents the logical "End" key on the keyboard.
740 ///
741 /// See the function `RawKeyEvent.logicalKey` for more information.
742 pub const END: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000305);
743
744 /// Represents the logical "Home" key on the keyboard.
745 ///
746 /// See the function `RawKeyEvent.logicalKey` for more information.
747 pub const HOME: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000306);
748
749 /// Represents the logical "Page Down" key on the keyboard.
750 ///
751 /// See the function `RawKeyEvent.logicalKey` for more information.
752 pub const PAGE_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000307);
753
754 /// Represents the logical "Page Up" key on the keyboard.
755 ///
756 /// See the function `RawKeyEvent.logicalKey` for more information.
757 pub const PAGE_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000308);
758
759 /// Represents the logical "Clear" key on the keyboard.
760 ///
761 /// See the function `RawKeyEvent.logicalKey` for more information.
762 pub const CLEAR: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000401);
763
764 /// Represents the logical "Copy" key on the keyboard.
765 ///
766 /// See the function `RawKeyEvent.logicalKey` for more information.
767 pub const COPY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000402);
768
769 /// Represents the logical "Cr Sel" key on the keyboard.
770 ///
771 /// See the function `RawKeyEvent.logicalKey` for more information.
772 pub const CR_SEL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000403);
773
774 /// Represents the logical "Cut" key on the keyboard.
775 ///
776 /// See the function `RawKeyEvent.logicalKey` for more information.
777 pub const CUT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000404);
778
779 /// Represents the logical "Erase Eof" key on the keyboard.
780 ///
781 /// See the function `RawKeyEvent.logicalKey` for more information.
782 pub const ERASE_EOF: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000405);
783
784 /// Represents the logical "Ex Sel" key on the keyboard.
785 ///
786 /// See the function `RawKeyEvent.logicalKey` for more information.
787 pub const EX_SEL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000406);
788
789 /// Represents the logical "Insert" key on the keyboard.
790 ///
791 /// See the function `RawKeyEvent.logicalKey` for more information.
792 pub const INSERT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000407);
793
794 /// Represents the logical "Paste" key on the keyboard.
795 ///
796 /// See the function `RawKeyEvent.logicalKey` for more information.
797 pub const PASTE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000408);
798
799 /// Represents the logical "Redo" key on the keyboard.
800 ///
801 /// See the function `RawKeyEvent.logicalKey` for more information.
802 pub const REDO: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000409);
803
804 /// Represents the logical "Undo" key on the keyboard.
805 ///
806 /// See the function `RawKeyEvent.logicalKey` for more information.
807 pub const UNDO: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000040a);
808
809 /// Represents the logical "Accept" key on the keyboard.
810 ///
811 /// See the function `RawKeyEvent.logicalKey` for more information.
812 pub const ACCEPT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000501);
813
814 /// Represents the logical "Again" key on the keyboard.
815 ///
816 /// See the function `RawKeyEvent.logicalKey` for more information.
817 pub const AGAIN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000502);
818
819 /// Represents the logical "Attn" key on the keyboard.
820 ///
821 /// See the function `RawKeyEvent.logicalKey` for more information.
822 pub const ATTN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000503);
823
824 /// Represents the logical "Cancel" key on the keyboard.
825 ///
826 /// See the function `RawKeyEvent.logicalKey` for more information.
827 pub const CANCEL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000504);
828
829 /// Represents the logical "Context Menu" key on the keyboard.
830 ///
831 /// See the function `RawKeyEvent.logicalKey` for more information.
832 pub const CONTEXT_MENU: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000505);
833
834 /// Represents the logical "Execute" key on the keyboard.
835 ///
836 /// See the function `RawKeyEvent.logicalKey` for more information.
837 pub const EXECUTE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000506);
838
839 /// Represents the logical "Find" key on the keyboard.
840 ///
841 /// See the function `RawKeyEvent.logicalKey` for more information.
842 pub const FIND: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000507);
843
844 /// Represents the logical "Help" key on the keyboard.
845 ///
846 /// See the function `RawKeyEvent.logicalKey` for more information.
847 pub const HELP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000508);
848
849 /// Represents the logical "Pause" key on the keyboard.
850 ///
851 /// See the function `RawKeyEvent.logicalKey` for more information.
852 pub const PAUSE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000509);
853
854 /// Represents the logical "Play" key on the keyboard.
855 ///
856 /// See the function `RawKeyEvent.logicalKey` for more information.
857 pub const PLAY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000050a);
858
859 /// Represents the logical "Props" key on the keyboard.
860 ///
861 /// See the function `RawKeyEvent.logicalKey` for more information.
862 pub const PROPS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000050b);
863
864 /// Represents the logical "Select" key on the keyboard.
865 ///
866 /// See the function `RawKeyEvent.logicalKey` for more information.
867 pub const SELECT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000050c);
868
869 /// Represents the logical "Zoom In" key on the keyboard.
870 ///
871 /// See the function `RawKeyEvent.logicalKey` for more information.
872 pub const ZOOM_IN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000050d);
873
874 /// Represents the logical "Zoom Out" key on the keyboard.
875 ///
876 /// See the function `RawKeyEvent.logicalKey` for more information.
877 pub const ZOOM_OUT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000050e);
878
879 /// Represents the logical "Brightness Down" key on the keyboard.
880 ///
881 /// See the function `RawKeyEvent.logicalKey` for more information.
882 pub const BRIGHTNESS_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000601);
883
884 /// Represents the logical "Brightness Up" key on the keyboard.
885 ///
886 /// See the function `RawKeyEvent.logicalKey` for more information.
887 pub const BRIGHTNESS_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000602);
888
889 /// Represents the logical "Camera" key on the keyboard.
890 ///
891 /// See the function `RawKeyEvent.logicalKey` for more information.
892 pub const CAMERA: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000603);
893
894 /// Represents the logical "Eject" key on the keyboard.
895 ///
896 /// See the function `RawKeyEvent.logicalKey` for more information.
897 pub const EJECT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000604);
898
899 /// Represents the logical "Log Off" key on the keyboard.
900 ///
901 /// See the function `RawKeyEvent.logicalKey` for more information.
902 pub const LOG_OFF: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000605);
903
904 /// Represents the logical "Power" key on the keyboard.
905 ///
906 /// See the function `RawKeyEvent.logicalKey` for more information.
907 pub const POWER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000606);
908
909 /// Represents the logical "Power Off" key on the keyboard.
910 ///
911 /// See the function `RawKeyEvent.logicalKey` for more information.
912 pub const POWER_OFF: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000607);
913
914 /// Represents the logical "Print Screen" key on the keyboard.
915 ///
916 /// See the function `RawKeyEvent.logicalKey` for more information.
917 pub const PRINT_SCREEN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000608);
918
919 /// Represents the logical "Hibernate" key on the keyboard.
920 ///
921 /// See the function `RawKeyEvent.logicalKey` for more information.
922 pub const HIBERNATE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000609);
923
924 /// Represents the logical "Standby" key on the keyboard.
925 ///
926 /// See the function `RawKeyEvent.logicalKey` for more information.
927 pub const STANDBY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000060a);
928
929 /// Represents the logical "Wake Up" key on the keyboard.
930 ///
931 /// See the function `RawKeyEvent.logicalKey` for more information.
932 pub const WAKE_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000060b);
933
934 /// Represents the logical "All Candidates" key on the keyboard.
935 ///
936 /// See the function `RawKeyEvent.logicalKey` for more information.
937 pub const ALL_CANDIDATES: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000701);
938
939 /// Represents the logical "Alphanumeric" key on the keyboard.
940 ///
941 /// See the function `RawKeyEvent.logicalKey` for more information.
942 pub const ALPHANUMERIC: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000702);
943
944 /// Represents the logical "Code Input" key on the keyboard.
945 ///
946 /// See the function `RawKeyEvent.logicalKey` for more information.
947 pub const CODE_INPUT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000703);
948
949 /// Represents the logical "Compose" key on the keyboard.
950 ///
951 /// See the function `RawKeyEvent.logicalKey` for more information.
952 pub const COMPOSE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000704);
953
954 /// Represents the logical "Convert" key on the keyboard.
955 ///
956 /// See the function `RawKeyEvent.logicalKey` for more information.
957 pub const CONVERT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000705);
958
959 /// Represents the logical "Final Mode" key on the keyboard.
960 ///
961 /// See the function `RawKeyEvent.logicalKey` for more information.
962 pub const FINAL_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000706);
963
964 /// Represents the logical "Group First" key on the keyboard.
965 ///
966 /// See the function `RawKeyEvent.logicalKey` for more information.
967 pub const GROUP_FIRST: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000707);
968
969 /// Represents the logical "Group Last" key on the keyboard.
970 ///
971 /// See the function `RawKeyEvent.logicalKey` for more information.
972 pub const GROUP_LAST: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000708);
973
974 /// Represents the logical "Group Next" key on the keyboard.
975 ///
976 /// See the function `RawKeyEvent.logicalKey` for more information.
977 pub const GROUP_NEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000709);
978
979 /// Represents the logical "Group Previous" key on the keyboard.
980 ///
981 /// See the function `RawKeyEvent.logicalKey` for more information.
982 pub const GROUP_PREVIOUS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000070a);
983
984 /// Represents the logical "Mode Change" key on the keyboard.
985 ///
986 /// See the function `RawKeyEvent.logicalKey` for more information.
987 pub const MODE_CHANGE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000070b);
988
989 /// Represents the logical "Next Candidate" key on the keyboard.
990 ///
991 /// See the function `RawKeyEvent.logicalKey` for more information.
992 pub const NEXT_CANDIDATE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000070c);
993
994 /// Represents the logical "Non Convert" key on the keyboard.
995 ///
996 /// See the function `RawKeyEvent.logicalKey` for more information.
997 pub const NON_CONVERT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000070d);
998
999 /// Represents the logical "Previous Candidate" key on the keyboard.
1000 ///
1001 /// See the function `RawKeyEvent.logicalKey` for more information.
1002 pub const PREVIOUS_CANDIDATE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000070e);
1003
1004 /// Represents the logical "Process" key on the keyboard.
1005 ///
1006 /// See the function `RawKeyEvent.logicalKey` for more information.
1007 pub const PROCESS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000070f);
1008
1009 /// Represents the logical "Single Candidate" key on the keyboard.
1010 ///
1011 /// See the function `RawKeyEvent.logicalKey` for more information.
1012 pub const SINGLE_CANDIDATE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000710);
1013
1014 /// Represents the logical "Hangul Mode" key on the keyboard.
1015 ///
1016 /// See the function `RawKeyEvent.logicalKey` for more information.
1017 pub const HANGUL_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000711);
1018
1019 /// Represents the logical "Hanja Mode" key on the keyboard.
1020 ///
1021 /// See the function `RawKeyEvent.logicalKey` for more information.
1022 pub const HANJA_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000712);
1023
1024 /// Represents the logical "Junja Mode" key on the keyboard.
1025 ///
1026 /// See the function `RawKeyEvent.logicalKey` for more information.
1027 pub const JUNJA_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000713);
1028
1029 /// Represents the logical "Eisu" key on the keyboard.
1030 ///
1031 /// See the function `RawKeyEvent.logicalKey` for more information.
1032 pub const EISU: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000714);
1033
1034 /// Represents the logical "Hankaku" key on the keyboard.
1035 ///
1036 /// See the function `RawKeyEvent.logicalKey` for more information.
1037 pub const HANKAKU: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000715);
1038
1039 /// Represents the logical "Hiragana" key on the keyboard.
1040 ///
1041 /// See the function `RawKeyEvent.logicalKey` for more information.
1042 pub const HIRAGANA: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000716);
1043
1044 /// Represents the logical "Hiragana Katakana" key on the keyboard.
1045 ///
1046 /// See the function `RawKeyEvent.logicalKey` for more information.
1047 pub const HIRAGANA_KATAKANA: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000717);
1048
1049 /// Represents the logical "Kana Mode" key on the keyboard.
1050 ///
1051 /// See the function `RawKeyEvent.logicalKey` for more information.
1052 pub const KANA_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000718);
1053
1054 /// Represents the logical "Kanji Mode" key on the keyboard.
1055 ///
1056 /// See the function `RawKeyEvent.logicalKey` for more information.
1057 pub const KANJI_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000719);
1058
1059 /// Represents the logical "Katakana" key on the keyboard.
1060 ///
1061 /// See the function `RawKeyEvent.logicalKey` for more information.
1062 pub const KATAKANA: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000071a);
1063
1064 /// Represents the logical "Romaji" key on the keyboard.
1065 ///
1066 /// See the function `RawKeyEvent.logicalKey` for more information.
1067 pub const ROMAJI: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000071b);
1068
1069 /// Represents the logical "Zenkaku" key on the keyboard.
1070 ///
1071 /// See the function `RawKeyEvent.logicalKey` for more information.
1072 pub const ZENKAKU: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000071c);
1073
1074 /// Represents the logical "Zenkaku Hankaku" key on the keyboard.
1075 ///
1076 /// See the function `RawKeyEvent.logicalKey` for more information.
1077 pub const ZENKAKU_HANKAKU: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000071d);
1078
1079 /// Represents the logical "F1" key on the keyboard.
1080 ///
1081 /// See the function `RawKeyEvent.logicalKey` for more information.
1082 pub const F1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000801);
1083
1084 /// Represents the logical "F2" key on the keyboard.
1085 ///
1086 /// See the function `RawKeyEvent.logicalKey` for more information.
1087 pub const F2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000802);
1088
1089 /// Represents the logical "F3" key on the keyboard.
1090 ///
1091 /// See the function `RawKeyEvent.logicalKey` for more information.
1092 pub const F3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000803);
1093
1094 /// Represents the logical "F4" key on the keyboard.
1095 ///
1096 /// See the function `RawKeyEvent.logicalKey` for more information.
1097 pub const F4: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000804);
1098
1099 /// Represents the logical "F5" key on the keyboard.
1100 ///
1101 /// See the function `RawKeyEvent.logicalKey` for more information.
1102 pub const F5: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000805);
1103
1104 /// Represents the logical "F6" key on the keyboard.
1105 ///
1106 /// See the function `RawKeyEvent.logicalKey` for more information.
1107 pub const F6: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000806);
1108
1109 /// Represents the logical "F7" key on the keyboard.
1110 ///
1111 /// See the function `RawKeyEvent.logicalKey` for more information.
1112 pub const F7: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000807);
1113
1114 /// Represents the logical "F8" key on the keyboard.
1115 ///
1116 /// See the function `RawKeyEvent.logicalKey` for more information.
1117 pub const F8: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000808);
1118
1119 /// Represents the logical "F9" key on the keyboard.
1120 ///
1121 /// See the function `RawKeyEvent.logicalKey` for more information.
1122 pub const F9: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000809);
1123
1124 /// Represents the logical "F10" key on the keyboard.
1125 ///
1126 /// See the function `RawKeyEvent.logicalKey` for more information.
1127 pub const F10: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000080a);
1128
1129 /// Represents the logical "F11" key on the keyboard.
1130 ///
1131 /// See the function `RawKeyEvent.logicalKey` for more information.
1132 pub const F11: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000080b);
1133
1134 /// Represents the logical "F12" key on the keyboard.
1135 ///
1136 /// See the function `RawKeyEvent.logicalKey` for more information.
1137 pub const F12: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000080c);
1138
1139 /// Represents the logical "F13" key on the keyboard.
1140 ///
1141 /// See the function `RawKeyEvent.logicalKey` for more information.
1142 pub const F13: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000080d);
1143
1144 /// Represents the logical "F14" key on the keyboard.
1145 ///
1146 /// See the function `RawKeyEvent.logicalKey` for more information.
1147 pub const F14: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000080e);
1148
1149 /// Represents the logical "F15" key on the keyboard.
1150 ///
1151 /// See the function `RawKeyEvent.logicalKey` for more information.
1152 pub const F15: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000080f);
1153
1154 /// Represents the logical "F16" key on the keyboard.
1155 ///
1156 /// See the function `RawKeyEvent.logicalKey` for more information.
1157 pub const F16: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000810);
1158
1159 /// Represents the logical "F17" key on the keyboard.
1160 ///
1161 /// See the function `RawKeyEvent.logicalKey` for more information.
1162 pub const F17: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000811);
1163
1164 /// Represents the logical "F18" key on the keyboard.
1165 ///
1166 /// See the function `RawKeyEvent.logicalKey` for more information.
1167 pub const F18: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000812);
1168
1169 /// Represents the logical "F19" key on the keyboard.
1170 ///
1171 /// See the function `RawKeyEvent.logicalKey` for more information.
1172 pub const F19: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000813);
1173
1174 /// Represents the logical "F20" key on the keyboard.
1175 ///
1176 /// See the function `RawKeyEvent.logicalKey` for more information.
1177 pub const F20: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000814);
1178
1179 /// Represents the logical "F21" key on the keyboard.
1180 ///
1181 /// See the function `RawKeyEvent.logicalKey` for more information.
1182 pub const F21: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000815);
1183
1184 /// Represents the logical "F22" key on the keyboard.
1185 ///
1186 /// See the function `RawKeyEvent.logicalKey` for more information.
1187 pub const F22: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000816);
1188
1189 /// Represents the logical "F23" key on the keyboard.
1190 ///
1191 /// See the function `RawKeyEvent.logicalKey` for more information.
1192 pub const F23: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000817);
1193
1194 /// Represents the logical "F24" key on the keyboard.
1195 ///
1196 /// See the function `RawKeyEvent.logicalKey` for more information.
1197 pub const F24: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000818);
1198
1199 /// Represents the logical "Soft 1" key on the keyboard.
1200 ///
1201 /// See the function `RawKeyEvent.logicalKey` for more information.
1202 pub const SOFT1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000901);
1203
1204 /// Represents the logical "Soft 2" key on the keyboard.
1205 ///
1206 /// See the function `RawKeyEvent.logicalKey` for more information.
1207 pub const SOFT2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000902);
1208
1209 /// Represents the logical "Soft 3" key on the keyboard.
1210 ///
1211 /// See the function `RawKeyEvent.logicalKey` for more information.
1212 pub const SOFT3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000903);
1213
1214 /// Represents the logical "Soft 4" key on the keyboard.
1215 ///
1216 /// See the function `RawKeyEvent.logicalKey` for more information.
1217 pub const SOFT4: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000904);
1218
1219 /// Represents the logical "Soft 5" key on the keyboard.
1220 ///
1221 /// See the function `RawKeyEvent.logicalKey` for more information.
1222 pub const SOFT5: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000905);
1223
1224 /// Represents the logical "Soft 6" key on the keyboard.
1225 ///
1226 /// See the function `RawKeyEvent.logicalKey` for more information.
1227 pub const SOFT6: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000906);
1228
1229 /// Represents the logical "Soft 7" key on the keyboard.
1230 ///
1231 /// See the function `RawKeyEvent.logicalKey` for more information.
1232 pub const SOFT7: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000907);
1233
1234 /// Represents the logical "Soft 8" key on the keyboard.
1235 ///
1236 /// See the function `RawKeyEvent.logicalKey` for more information.
1237 pub const SOFT8: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000908);
1238
1239 /// Represents the logical "Close" key on the keyboard.
1240 ///
1241 /// See the function `RawKeyEvent.logicalKey` for more information.
1242 pub const CLOSE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a01);
1243
1244 /// Represents the logical "Mail Forward" key on the keyboard.
1245 ///
1246 /// See the function `RawKeyEvent.logicalKey` for more information.
1247 pub const MAIL_FORWARD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a02);
1248
1249 /// Represents the logical "Mail Reply" key on the keyboard.
1250 ///
1251 /// See the function `RawKeyEvent.logicalKey` for more information.
1252 pub const MAIL_REPLY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a03);
1253
1254 /// Represents the logical "Mail Send" key on the keyboard.
1255 ///
1256 /// See the function `RawKeyEvent.logicalKey` for more information.
1257 pub const MAIL_SEND: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a04);
1258
1259 /// Represents the logical "Media Play Pause" key on the keyboard.
1260 ///
1261 /// See the function `RawKeyEvent.logicalKey` for more information.
1262 pub const MEDIA_PLAY_PAUSE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a05);
1263
1264 /// Represents the logical "Media Stop" key on the keyboard.
1265 ///
1266 /// See the function `RawKeyEvent.logicalKey` for more information.
1267 pub const MEDIA_STOP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a07);
1268
1269 /// Represents the logical "Media Track Next" key on the keyboard.
1270 ///
1271 /// See the function `RawKeyEvent.logicalKey` for more information.
1272 pub const MEDIA_TRACK_NEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a08);
1273
1274 /// Represents the logical "Media Track Previous" key on the keyboard.
1275 ///
1276 /// See the function `RawKeyEvent.logicalKey` for more information.
1277 pub const MEDIA_TRACK_PREVIOUS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a09);
1278
1279 /// Represents the logical "New" key on the keyboard.
1280 ///
1281 /// See the function `RawKeyEvent.logicalKey` for more information.
1282 pub const NEW_KEY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a0a);
1283
1284 /// Represents the logical "Open" key on the keyboard.
1285 ///
1286 /// See the function `RawKeyEvent.logicalKey` for more information.
1287 pub const OPEN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a0b);
1288
1289 /// Represents the logical "Print" key on the keyboard.
1290 ///
1291 /// See the function `RawKeyEvent.logicalKey` for more information.
1292 pub const PRINT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a0c);
1293
1294 /// Represents the logical "Save" key on the keyboard.
1295 ///
1296 /// See the function `RawKeyEvent.logicalKey` for more information.
1297 pub const SAVE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a0d);
1298
1299 /// Represents the logical "Spell Check" key on the keyboard.
1300 ///
1301 /// See the function `RawKeyEvent.logicalKey` for more information.
1302 pub const SPELL_CHECK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a0e);
1303
1304 /// Represents the logical "Audio Volume Down" key on the keyboard.
1305 ///
1306 /// See the function `RawKeyEvent.logicalKey` for more information.
1307 pub const AUDIO_VOLUME_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a0f);
1308
1309 /// Represents the logical "Audio Volume Up" key on the keyboard.
1310 ///
1311 /// See the function `RawKeyEvent.logicalKey` for more information.
1312 pub const AUDIO_VOLUME_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a10);
1313
1314 /// Represents the logical "Audio Volume Mute" key on the keyboard.
1315 ///
1316 /// See the function `RawKeyEvent.logicalKey` for more information.
1317 pub const AUDIO_VOLUME_MUTE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000a11);
1318
1319 /// Represents the logical "Launch Application 2" key on the keyboard.
1320 ///
1321 /// See the function `RawKeyEvent.logicalKey` for more information.
1322 pub const LAUNCH_APPLICATION2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b01);
1323
1324 /// Represents the logical "Launch Calendar" key on the keyboard.
1325 ///
1326 /// See the function `RawKeyEvent.logicalKey` for more information.
1327 pub const LAUNCH_CALENDAR: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b02);
1328
1329 /// Represents the logical "Launch Mail" key on the keyboard.
1330 ///
1331 /// See the function `RawKeyEvent.logicalKey` for more information.
1332 pub const LAUNCH_MAIL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b03);
1333
1334 /// Represents the logical "Launch Media Player" key on the keyboard.
1335 ///
1336 /// See the function `RawKeyEvent.logicalKey` for more information.
1337 pub const LAUNCH_MEDIA_PLAYER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b04);
1338
1339 /// Represents the logical "Launch Music Player" key on the keyboard.
1340 ///
1341 /// See the function `RawKeyEvent.logicalKey` for more information.
1342 pub const LAUNCH_MUSIC_PLAYER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b05);
1343
1344 /// Represents the logical "Launch Application 1" key on the keyboard.
1345 ///
1346 /// See the function `RawKeyEvent.logicalKey` for more information.
1347 pub const LAUNCH_APPLICATION1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b06);
1348
1349 /// Represents the logical "Launch Screen Saver" key on the keyboard.
1350 ///
1351 /// See the function `RawKeyEvent.logicalKey` for more information.
1352 pub const LAUNCH_SCREEN_SAVER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b07);
1353
1354 /// Represents the logical "Launch Spreadsheet" key on the keyboard.
1355 ///
1356 /// See the function `RawKeyEvent.logicalKey` for more information.
1357 pub const LAUNCH_SPREADSHEET: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b08);
1358
1359 /// Represents the logical "Launch Web Browser" key on the keyboard.
1360 ///
1361 /// See the function `RawKeyEvent.logicalKey` for more information.
1362 pub const LAUNCH_WEB_BROWSER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b09);
1363
1364 /// Represents the logical "Launch Web Cam" key on the keyboard.
1365 ///
1366 /// See the function `RawKeyEvent.logicalKey` for more information.
1367 pub const LAUNCH_WEB_CAM: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b0a);
1368
1369 /// Represents the logical "Launch Word Processor" key on the keyboard.
1370 ///
1371 /// See the function `RawKeyEvent.logicalKey` for more information.
1372 pub const LAUNCH_WORD_PROCESSOR: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b0b);
1373
1374 /// Represents the logical "Launch Contacts" key on the keyboard.
1375 ///
1376 /// See the function `RawKeyEvent.logicalKey` for more information.
1377 pub const LAUNCH_CONTACTS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b0c);
1378
1379 /// Represents the logical "Launch Phone" key on the keyboard.
1380 ///
1381 /// See the function `RawKeyEvent.logicalKey` for more information.
1382 pub const LAUNCH_PHONE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b0d);
1383
1384 /// Represents the logical "Launch Assistant" key on the keyboard.
1385 ///
1386 /// See the function `RawKeyEvent.logicalKey` for more information.
1387 pub const LAUNCH_ASSISTANT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b0e);
1388
1389 /// Represents the logical "Launch Control Panel" key on the keyboard.
1390 ///
1391 /// See the function `RawKeyEvent.logicalKey` for more information.
1392 pub const LAUNCH_CONTROL_PANEL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000b0f);
1393
1394 /// Represents the logical "Browser Back" key on the keyboard.
1395 ///
1396 /// See the function `RawKeyEvent.logicalKey` for more information.
1397 pub const BROWSER_BACK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000c01);
1398
1399 /// Represents the logical "Browser Favorites" key on the keyboard.
1400 ///
1401 /// See the function `RawKeyEvent.logicalKey` for more information.
1402 pub const BROWSER_FAVORITES: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000c02);
1403
1404 /// Represents the logical "Browser Forward" key on the keyboard.
1405 ///
1406 /// See the function `RawKeyEvent.logicalKey` for more information.
1407 pub const BROWSER_FORWARD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000c03);
1408
1409 /// Represents the logical "Browser Home" key on the keyboard.
1410 ///
1411 /// See the function `RawKeyEvent.logicalKey` for more information.
1412 pub const BROWSER_HOME: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000c04);
1413
1414 /// Represents the logical "Browser Refresh" key on the keyboard.
1415 ///
1416 /// See the function `RawKeyEvent.logicalKey` for more information.
1417 pub const BROWSER_REFRESH: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000c05);
1418
1419 /// Represents the logical "Browser Search" key on the keyboard.
1420 ///
1421 /// See the function `RawKeyEvent.logicalKey` for more information.
1422 pub const BROWSER_SEARCH: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000c06);
1423
1424 /// Represents the logical "Browser Stop" key on the keyboard.
1425 ///
1426 /// See the function `RawKeyEvent.logicalKey` for more information.
1427 pub const BROWSER_STOP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000c07);
1428
1429 /// Represents the logical "Audio Balance Left" key on the keyboard.
1430 ///
1431 /// See the function `RawKeyEvent.logicalKey` for more information.
1432 pub const AUDIO_BALANCE_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d01);
1433
1434 /// Represents the logical "Audio Balance Right" key on the keyboard.
1435 ///
1436 /// See the function `RawKeyEvent.logicalKey` for more information.
1437 pub const AUDIO_BALANCE_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d02);
1438
1439 /// Represents the logical "Audio Bass Boost Down" key on the keyboard.
1440 ///
1441 /// See the function `RawKeyEvent.logicalKey` for more information.
1442 pub const AUDIO_BASS_BOOST_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d03);
1443
1444 /// Represents the logical "Audio Bass Boost Up" key on the keyboard.
1445 ///
1446 /// See the function `RawKeyEvent.logicalKey` for more information.
1447 pub const AUDIO_BASS_BOOST_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d04);
1448
1449 /// Represents the logical "Audio Fader Front" key on the keyboard.
1450 ///
1451 /// See the function `RawKeyEvent.logicalKey` for more information.
1452 pub const AUDIO_FADER_FRONT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d05);
1453
1454 /// Represents the logical "Audio Fader Rear" key on the keyboard.
1455 ///
1456 /// See the function `RawKeyEvent.logicalKey` for more information.
1457 pub const AUDIO_FADER_REAR: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d06);
1458
1459 /// Represents the logical "Audio Surround Mode Next" key on the keyboard.
1460 ///
1461 /// See the function `RawKeyEvent.logicalKey` for more information.
1462 pub const AUDIO_SURROUND_MODE_NEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d07);
1463
1464 /// Represents the logical "AVR Input" key on the keyboard.
1465 ///
1466 /// See the function `RawKeyEvent.logicalKey` for more information.
1467 pub const AVR_INPUT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d08);
1468
1469 /// Represents the logical "AVR Power" key on the keyboard.
1470 ///
1471 /// See the function `RawKeyEvent.logicalKey` for more information.
1472 pub const AVR_POWER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d09);
1473
1474 /// Represents the logical "Channel Down" key on the keyboard.
1475 ///
1476 /// See the function `RawKeyEvent.logicalKey` for more information.
1477 pub const CHANNEL_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d0a);
1478
1479 /// Represents the logical "Channel Up" key on the keyboard.
1480 ///
1481 /// See the function `RawKeyEvent.logicalKey` for more information.
1482 pub const CHANNEL_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d0b);
1483
1484 /// Represents the logical "Color F0 Red" key on the keyboard.
1485 ///
1486 /// See the function `RawKeyEvent.logicalKey` for more information.
1487 pub const COLOR_F0_RED: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d0c);
1488
1489 /// Represents the logical "Color F1 Green" key on the keyboard.
1490 ///
1491 /// See the function `RawKeyEvent.logicalKey` for more information.
1492 pub const COLOR_F1_GREEN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d0d);
1493
1494 /// Represents the logical "Color F2 Yellow" key on the keyboard.
1495 ///
1496 /// See the function `RawKeyEvent.logicalKey` for more information.
1497 pub const COLOR_F2_YELLOW: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d0e);
1498
1499 /// Represents the logical "Color F3 Blue" key on the keyboard.
1500 ///
1501 /// See the function `RawKeyEvent.logicalKey` for more information.
1502 pub const COLOR_F3_BLUE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d0f);
1503
1504 /// Represents the logical "Color F4 Grey" key on the keyboard.
1505 ///
1506 /// See the function `RawKeyEvent.logicalKey` for more information.
1507 pub const COLOR_F4_GREY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d10);
1508
1509 /// Represents the logical "Color F5 Brown" key on the keyboard.
1510 ///
1511 /// See the function `RawKeyEvent.logicalKey` for more information.
1512 pub const COLOR_F5_BROWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d11);
1513
1514 /// Represents the logical "Closed Caption Toggle" key on the keyboard.
1515 ///
1516 /// See the function `RawKeyEvent.logicalKey` for more information.
1517 pub const CLOSED_CAPTION_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d12);
1518
1519 /// Represents the logical "Dimmer" key on the keyboard.
1520 ///
1521 /// See the function `RawKeyEvent.logicalKey` for more information.
1522 pub const DIMMER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d13);
1523
1524 /// Represents the logical "Display Swap" key on the keyboard.
1525 ///
1526 /// See the function `RawKeyEvent.logicalKey` for more information.
1527 pub const DISPLAY_SWAP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d14);
1528
1529 /// Represents the logical "Exit" key on the keyboard.
1530 ///
1531 /// See the function `RawKeyEvent.logicalKey` for more information.
1532 pub const EXIT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d15);
1533
1534 /// Represents the logical "Favorite Clear 0" key on the keyboard.
1535 ///
1536 /// See the function `RawKeyEvent.logicalKey` for more information.
1537 pub const FAVORITE_CLEAR0: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d16);
1538
1539 /// Represents the logical "Favorite Clear 1" key on the keyboard.
1540 ///
1541 /// See the function `RawKeyEvent.logicalKey` for more information.
1542 pub const FAVORITE_CLEAR1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d17);
1543
1544 /// Represents the logical "Favorite Clear 2" key on the keyboard.
1545 ///
1546 /// See the function `RawKeyEvent.logicalKey` for more information.
1547 pub const FAVORITE_CLEAR2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d18);
1548
1549 /// Represents the logical "Favorite Clear 3" key on the keyboard.
1550 ///
1551 /// See the function `RawKeyEvent.logicalKey` for more information.
1552 pub const FAVORITE_CLEAR3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d19);
1553
1554 /// Represents the logical "Favorite Recall 0" key on the keyboard.
1555 ///
1556 /// See the function `RawKeyEvent.logicalKey` for more information.
1557 pub const FAVORITE_RECALL0: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d1a);
1558
1559 /// Represents the logical "Favorite Recall 1" key on the keyboard.
1560 ///
1561 /// See the function `RawKeyEvent.logicalKey` for more information.
1562 pub const FAVORITE_RECALL1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d1b);
1563
1564 /// Represents the logical "Favorite Recall 2" key on the keyboard.
1565 ///
1566 /// See the function `RawKeyEvent.logicalKey` for more information.
1567 pub const FAVORITE_RECALL2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d1c);
1568
1569 /// Represents the logical "Favorite Recall 3" key on the keyboard.
1570 ///
1571 /// See the function `RawKeyEvent.logicalKey` for more information.
1572 pub const FAVORITE_RECALL3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d1d);
1573
1574 /// Represents the logical "Favorite Store 0" key on the keyboard.
1575 ///
1576 /// See the function `RawKeyEvent.logicalKey` for more information.
1577 pub const FAVORITE_STORE0: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d1e);
1578
1579 /// Represents the logical "Favorite Store 1" key on the keyboard.
1580 ///
1581 /// See the function `RawKeyEvent.logicalKey` for more information.
1582 pub const FAVORITE_STORE1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d1f);
1583
1584 /// Represents the logical "Favorite Store 2" key on the keyboard.
1585 ///
1586 /// See the function `RawKeyEvent.logicalKey` for more information.
1587 pub const FAVORITE_STORE2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d20);
1588
1589 /// Represents the logical "Favorite Store 3" key on the keyboard.
1590 ///
1591 /// See the function `RawKeyEvent.logicalKey` for more information.
1592 pub const FAVORITE_STORE3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d21);
1593
1594 /// Represents the logical "Guide" key on the keyboard.
1595 ///
1596 /// See the function `RawKeyEvent.logicalKey` for more information.
1597 pub const GUIDE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d22);
1598
1599 /// Represents the logical "Guide Next Day" key on the keyboard.
1600 ///
1601 /// See the function `RawKeyEvent.logicalKey` for more information.
1602 pub const GUIDE_NEXT_DAY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d23);
1603
1604 /// Represents the logical "Guide Previous Day" key on the keyboard.
1605 ///
1606 /// See the function `RawKeyEvent.logicalKey` for more information.
1607 pub const GUIDE_PREVIOUS_DAY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d24);
1608
1609 /// Represents the logical "Info" key on the keyboard.
1610 ///
1611 /// See the function `RawKeyEvent.logicalKey` for more information.
1612 pub const INFO: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d25);
1613
1614 /// Represents the logical "Instant Replay" key on the keyboard.
1615 ///
1616 /// See the function `RawKeyEvent.logicalKey` for more information.
1617 pub const INSTANT_REPLAY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d26);
1618
1619 /// Represents the logical "Link" key on the keyboard.
1620 ///
1621 /// See the function `RawKeyEvent.logicalKey` for more information.
1622 pub const LINK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d27);
1623
1624 /// Represents the logical "List Program" key on the keyboard.
1625 ///
1626 /// See the function `RawKeyEvent.logicalKey` for more information.
1627 pub const LIST_PROGRAM: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d28);
1628
1629 /// Represents the logical "Live Content" key on the keyboard.
1630 ///
1631 /// See the function `RawKeyEvent.logicalKey` for more information.
1632 pub const LIVE_CONTENT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d29);
1633
1634 /// Represents the logical "Lock" key on the keyboard.
1635 ///
1636 /// See the function `RawKeyEvent.logicalKey` for more information.
1637 pub const LOCK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d2a);
1638
1639 /// Represents the logical "Media Apps" key on the keyboard.
1640 ///
1641 /// See the function `RawKeyEvent.logicalKey` for more information.
1642 pub const MEDIA_APPS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d2b);
1643
1644 /// Represents the logical "Media Fast Forward" key on the keyboard.
1645 ///
1646 /// See the function `RawKeyEvent.logicalKey` for more information.
1647 pub const MEDIA_FAST_FORWARD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d2c);
1648
1649 /// Represents the logical "Media Last" key on the keyboard.
1650 ///
1651 /// See the function `RawKeyEvent.logicalKey` for more information.
1652 pub const MEDIA_LAST: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d2d);
1653
1654 /// Represents the logical "Media Pause" key on the keyboard.
1655 ///
1656 /// See the function `RawKeyEvent.logicalKey` for more information.
1657 pub const MEDIA_PAUSE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d2e);
1658
1659 /// Represents the logical "Media Play" key on the keyboard.
1660 ///
1661 /// See the function `RawKeyEvent.logicalKey` for more information.
1662 pub const MEDIA_PLAY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d2f);
1663
1664 /// Represents the logical "Media Record" key on the keyboard.
1665 ///
1666 /// See the function `RawKeyEvent.logicalKey` for more information.
1667 pub const MEDIA_RECORD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d30);
1668
1669 /// Represents the logical "Media Rewind" key on the keyboard.
1670 ///
1671 /// See the function `RawKeyEvent.logicalKey` for more information.
1672 pub const MEDIA_REWIND: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d31);
1673
1674 /// Represents the logical "Media Skip" key on the keyboard.
1675 ///
1676 /// See the function `RawKeyEvent.logicalKey` for more information.
1677 pub const MEDIA_SKIP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d32);
1678
1679 /// Represents the logical "Next Favorite Channel" key on the keyboard.
1680 ///
1681 /// See the function `RawKeyEvent.logicalKey` for more information.
1682 pub const NEXT_FAVORITE_CHANNEL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d33);
1683
1684 /// Represents the logical "Next User Profile" key on the keyboard.
1685 ///
1686 /// See the function `RawKeyEvent.logicalKey` for more information.
1687 pub const NEXT_USER_PROFILE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d34);
1688
1689 /// Represents the logical "On Demand" key on the keyboard.
1690 ///
1691 /// See the function `RawKeyEvent.logicalKey` for more information.
1692 pub const ON_DEMAND: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d35);
1693
1694 /// Represents the logical "P In P Down" key on the keyboard.
1695 ///
1696 /// See the function `RawKeyEvent.logicalKey` for more information.
1697 pub const P_IN_P_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d36);
1698
1699 /// Represents the logical "P In P Move" key on the keyboard.
1700 ///
1701 /// See the function `RawKeyEvent.logicalKey` for more information.
1702 pub const P_IN_P_MOVE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d37);
1703
1704 /// Represents the logical "P In P Toggle" key on the keyboard.
1705 ///
1706 /// See the function `RawKeyEvent.logicalKey` for more information.
1707 pub const P_IN_P_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d38);
1708
1709 /// Represents the logical "P In P Up" key on the keyboard.
1710 ///
1711 /// See the function `RawKeyEvent.logicalKey` for more information.
1712 pub const P_IN_P_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d39);
1713
1714 /// Represents the logical "Play Speed Down" key on the keyboard.
1715 ///
1716 /// See the function `RawKeyEvent.logicalKey` for more information.
1717 pub const PLAY_SPEED_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d3a);
1718
1719 /// Represents the logical "Play Speed Reset" key on the keyboard.
1720 ///
1721 /// See the function `RawKeyEvent.logicalKey` for more information.
1722 pub const PLAY_SPEED_RESET: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d3b);
1723
1724 /// Represents the logical "Play Speed Up" key on the keyboard.
1725 ///
1726 /// See the function `RawKeyEvent.logicalKey` for more information.
1727 pub const PLAY_SPEED_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d3c);
1728
1729 /// Represents the logical "Random Toggle" key on the keyboard.
1730 ///
1731 /// See the function `RawKeyEvent.logicalKey` for more information.
1732 pub const RANDOM_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d3d);
1733
1734 /// Represents the logical "Rc Low Battery" key on the keyboard.
1735 ///
1736 /// See the function `RawKeyEvent.logicalKey` for more information.
1737 pub const RC_LOW_BATTERY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d3e);
1738
1739 /// Represents the logical "Record Speed Next" key on the keyboard.
1740 ///
1741 /// See the function `RawKeyEvent.logicalKey` for more information.
1742 pub const RECORD_SPEED_NEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d3f);
1743
1744 /// Represents the logical "Rf Bypass" key on the keyboard.
1745 ///
1746 /// See the function `RawKeyEvent.logicalKey` for more information.
1747 pub const RF_BYPASS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d40);
1748
1749 /// Represents the logical "Scan Channels Toggle" key on the keyboard.
1750 ///
1751 /// See the function `RawKeyEvent.logicalKey` for more information.
1752 pub const SCAN_CHANNELS_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d41);
1753
1754 /// Represents the logical "Screen Mode Next" key on the keyboard.
1755 ///
1756 /// See the function `RawKeyEvent.logicalKey` for more information.
1757 pub const SCREEN_MODE_NEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d42);
1758
1759 /// Represents the logical "Settings" key on the keyboard.
1760 ///
1761 /// See the function `RawKeyEvent.logicalKey` for more information.
1762 pub const SETTINGS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d43);
1763
1764 /// Represents the logical "Split Screen Toggle" key on the keyboard.
1765 ///
1766 /// See the function `RawKeyEvent.logicalKey` for more information.
1767 pub const SPLIT_SCREEN_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d44);
1768
1769 /// Represents the logical "STB Input" key on the keyboard.
1770 ///
1771 /// See the function `RawKeyEvent.logicalKey` for more information.
1772 pub const STB_INPUT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d45);
1773
1774 /// Represents the logical "STB Power" key on the keyboard.
1775 ///
1776 /// See the function `RawKeyEvent.logicalKey` for more information.
1777 pub const STB_POWER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d46);
1778
1779 /// Represents the logical "Subtitle" key on the keyboard.
1780 ///
1781 /// See the function `RawKeyEvent.logicalKey` for more information.
1782 pub const SUBTITLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d47);
1783
1784 /// Represents the logical "Teletext" key on the keyboard.
1785 ///
1786 /// See the function `RawKeyEvent.logicalKey` for more information.
1787 pub const TELETEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d48);
1788
1789 /// Represents the logical "TV" key on the keyboard.
1790 ///
1791 /// See the function `RawKeyEvent.logicalKey` for more information.
1792 pub const TV: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d49);
1793
1794 /// Represents the logical "TV Input" key on the keyboard.
1795 ///
1796 /// See the function `RawKeyEvent.logicalKey` for more information.
1797 pub const TV_INPUT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d4a);
1798
1799 /// Represents the logical "TV Power" key on the keyboard.
1800 ///
1801 /// See the function `RawKeyEvent.logicalKey` for more information.
1802 pub const TV_POWER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d4b);
1803
1804 /// Represents the logical "Video Mode Next" key on the keyboard.
1805 ///
1806 /// See the function `RawKeyEvent.logicalKey` for more information.
1807 pub const VIDEO_MODE_NEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d4c);
1808
1809 /// Represents the logical "Wink" key on the keyboard.
1810 ///
1811 /// See the function `RawKeyEvent.logicalKey` for more information.
1812 pub const WINK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d4d);
1813
1814 /// Represents the logical "Zoom Toggle" key on the keyboard.
1815 ///
1816 /// See the function `RawKeyEvent.logicalKey` for more information.
1817 pub const ZOOM_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d4e);
1818
1819 /// Represents the logical "DVR" key on the keyboard.
1820 ///
1821 /// See the function `RawKeyEvent.logicalKey` for more information.
1822 pub const DVR: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d4f);
1823
1824 /// Represents the logical "Media Audio Track" key on the keyboard.
1825 ///
1826 /// See the function `RawKeyEvent.logicalKey` for more information.
1827 pub const MEDIA_AUDIO_TRACK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d50);
1828
1829 /// Represents the logical "Media Skip Backward" key on the keyboard.
1830 ///
1831 /// See the function `RawKeyEvent.logicalKey` for more information.
1832 pub const MEDIA_SKIP_BACKWARD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d51);
1833
1834 /// Represents the logical "Media Skip Forward" key on the keyboard.
1835 ///
1836 /// See the function `RawKeyEvent.logicalKey` for more information.
1837 pub const MEDIA_SKIP_FORWARD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d52);
1838
1839 /// Represents the logical "Media Step Backward" key on the keyboard.
1840 ///
1841 /// See the function `RawKeyEvent.logicalKey` for more information.
1842 pub const MEDIA_STEP_BACKWARD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d53);
1843
1844 /// Represents the logical "Media Step Forward" key on the keyboard.
1845 ///
1846 /// See the function `RawKeyEvent.logicalKey` for more information.
1847 pub const MEDIA_STEP_FORWARD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d54);
1848
1849 /// Represents the logical "Media Top Menu" key on the keyboard.
1850 ///
1851 /// See the function `RawKeyEvent.logicalKey` for more information.
1852 pub const MEDIA_TOP_MENU: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d55);
1853
1854 /// Represents the logical "Navigate In" key on the keyboard.
1855 ///
1856 /// See the function `RawKeyEvent.logicalKey` for more information.
1857 pub const NAVIGATE_IN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d56);
1858
1859 /// Represents the logical "Navigate Next" key on the keyboard.
1860 ///
1861 /// See the function `RawKeyEvent.logicalKey` for more information.
1862 pub const NAVIGATE_NEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d57);
1863
1864 /// Represents the logical "Navigate Out" key on the keyboard.
1865 ///
1866 /// See the function `RawKeyEvent.logicalKey` for more information.
1867 pub const NAVIGATE_OUT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d58);
1868
1869 /// Represents the logical "Navigate Previous" key on the keyboard.
1870 ///
1871 /// See the function `RawKeyEvent.logicalKey` for more information.
1872 pub const NAVIGATE_PREVIOUS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d59);
1873
1874 /// Represents the logical "Pairing" key on the keyboard.
1875 ///
1876 /// See the function `RawKeyEvent.logicalKey` for more information.
1877 pub const PAIRING: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d5a);
1878
1879 /// Represents the logical "Media Close" key on the keyboard.
1880 ///
1881 /// See the function `RawKeyEvent.logicalKey` for more information.
1882 pub const MEDIA_CLOSE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000d5b);
1883
1884 /// Represents the logical "Audio Bass Boost Toggle" key on the keyboard.
1885 ///
1886 /// See the function `RawKeyEvent.logicalKey` for more information.
1887 pub const AUDIO_BASS_BOOST_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000e02);
1888
1889 /// Represents the logical "Audio Treble Down" key on the keyboard.
1890 ///
1891 /// See the function `RawKeyEvent.logicalKey` for more information.
1892 pub const AUDIO_TREBLE_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000e04);
1893
1894 /// Represents the logical "Audio Treble Up" key on the keyboard.
1895 ///
1896 /// See the function `RawKeyEvent.logicalKey` for more information.
1897 pub const AUDIO_TREBLE_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000e05);
1898
1899 /// Represents the logical "Microphone Toggle" key on the keyboard.
1900 ///
1901 /// See the function `RawKeyEvent.logicalKey` for more information.
1902 pub const MICROPHONE_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000e06);
1903
1904 /// Represents the logical "Microphone Volume Down" key on the keyboard.
1905 ///
1906 /// See the function `RawKeyEvent.logicalKey` for more information.
1907 pub const MICROPHONE_VOLUME_DOWN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000e07);
1908
1909 /// Represents the logical "Microphone Volume Up" key on the keyboard.
1910 ///
1911 /// See the function `RawKeyEvent.logicalKey` for more information.
1912 pub const MICROPHONE_VOLUME_UP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000e08);
1913
1914 /// Represents the logical "Microphone Volume Mute" key on the keyboard.
1915 ///
1916 /// See the function `RawKeyEvent.logicalKey` for more information.
1917 pub const MICROPHONE_VOLUME_MUTE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000e09);
1918
1919 /// Represents the logical "Speech Correction List" key on the keyboard.
1920 ///
1921 /// See the function `RawKeyEvent.logicalKey` for more information.
1922 pub const SPEECH_CORRECTION_LIST: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000f01);
1923
1924 /// Represents the logical "Speech Input Toggle" key on the keyboard.
1925 ///
1926 /// See the function `RawKeyEvent.logicalKey` for more information.
1927 pub const SPEECH_INPUT_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100000f02);
1928
1929 /// Represents the logical "App Switch" key on the keyboard.
1930 ///
1931 /// See the function `RawKeyEvent.logicalKey` for more information.
1932 pub const APP_SWITCH: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001001);
1933
1934 /// Represents the logical "Call" key on the keyboard.
1935 ///
1936 /// See the function `RawKeyEvent.logicalKey` for more information.
1937 pub const CALL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001002);
1938
1939 /// Represents the logical "Camera Focus" key on the keyboard.
1940 ///
1941 /// See the function `RawKeyEvent.logicalKey` for more information.
1942 pub const CAMERA_FOCUS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001003);
1943
1944 /// Represents the logical "End Call" key on the keyboard.
1945 ///
1946 /// See the function `RawKeyEvent.logicalKey` for more information.
1947 pub const END_CALL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001004);
1948
1949 /// Represents the logical "Go Back" key on the keyboard.
1950 ///
1951 /// See the function `RawKeyEvent.logicalKey` for more information.
1952 pub const GO_BACK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001005);
1953
1954 /// Represents the logical "Go Home" key on the keyboard.
1955 ///
1956 /// See the function `RawKeyEvent.logicalKey` for more information.
1957 pub const GO_HOME: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001006);
1958
1959 /// Represents the logical "Headset Hook" key on the keyboard.
1960 ///
1961 /// See the function `RawKeyEvent.logicalKey` for more information.
1962 pub const HEADSET_HOOK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001007);
1963
1964 /// Represents the logical "Last Number Redial" key on the keyboard.
1965 ///
1966 /// See the function `RawKeyEvent.logicalKey` for more information.
1967 pub const LAST_NUMBER_REDIAL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001008);
1968
1969 /// Represents the logical "Notification" key on the keyboard.
1970 ///
1971 /// See the function `RawKeyEvent.logicalKey` for more information.
1972 pub const NOTIFICATION: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001009);
1973
1974 /// Represents the logical "Manner Mode" key on the keyboard.
1975 ///
1976 /// See the function `RawKeyEvent.logicalKey` for more information.
1977 pub const MANNER_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000100a);
1978
1979 /// Represents the logical "Voice Dial" key on the keyboard.
1980 ///
1981 /// See the function `RawKeyEvent.logicalKey` for more information.
1982 pub const VOICE_DIAL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000100b);
1983
1984 /// Represents the logical "TV 3 D Mode" key on the keyboard.
1985 ///
1986 /// See the function `RawKeyEvent.logicalKey` for more information.
1987 pub const TV3_D_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001101);
1988
1989 /// Represents the logical "TV Antenna Cable" key on the keyboard.
1990 ///
1991 /// See the function `RawKeyEvent.logicalKey` for more information.
1992 pub const TV_ANTENNA_CABLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001102);
1993
1994 /// Represents the logical "TV Audio Description" key on the keyboard.
1995 ///
1996 /// See the function `RawKeyEvent.logicalKey` for more information.
1997 pub const TV_AUDIO_DESCRIPTION: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001103);
1998
1999 /// Represents the logical "TV Audio Description Mix Down" key on the
2000 /// keyboard.
2001 ///
2002 /// See the function `RawKeyEvent.logicalKey` for more information.
2003 pub const TV_AUDIO_DESCRIPTION_MIX_DOWN: LogicalKeyboardKey =
2004 LogicalKeyboardKey::new(0x00100001104);
2005
2006 /// Represents the logical "TV Audio Description Mix Up" key on the keyboard.
2007 ///
2008 /// See the function `RawKeyEvent.logicalKey` for more information.
2009 pub const TV_AUDIO_DESCRIPTION_MIX_UP: LogicalKeyboardKey =
2010 LogicalKeyboardKey::new(0x00100001105);
2011
2012 /// Represents the logical "TV Contents Menu" key on the keyboard.
2013 ///
2014 /// See the function `RawKeyEvent.logicalKey` for more information.
2015 pub const TV_CONTENTS_MENU: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001106);
2016
2017 /// Represents the logical "TV Data Service" key on the keyboard.
2018 ///
2019 /// See the function `RawKeyEvent.logicalKey` for more information.
2020 pub const TV_DATA_SERVICE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001107);
2021
2022 /// Represents the logical "TV Input Component 1" key on the keyboard.
2023 ///
2024 /// See the function `RawKeyEvent.logicalKey` for more information.
2025 pub const TV_INPUT_COMPONENT1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001108);
2026
2027 /// Represents the logical "TV Input Component 2" key on the keyboard.
2028 ///
2029 /// See the function `RawKeyEvent.logicalKey` for more information.
2030 pub const TV_INPUT_COMPONENT2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001109);
2031
2032 /// Represents the logical "TV Input Composite 1" key on the keyboard.
2033 ///
2034 /// See the function `RawKeyEvent.logicalKey` for more information.
2035 pub const TV_INPUT_COMPOSITE1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000110a);
2036
2037 /// Represents the logical "TV Input Composite 2" key on the keyboard.
2038 ///
2039 /// See the function `RawKeyEvent.logicalKey` for more information.
2040 pub const TV_INPUT_COMPOSITE2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000110b);
2041
2042 /// Represents the logical "TV Input HDMI 1" key on the keyboard.
2043 ///
2044 /// See the function `RawKeyEvent.logicalKey` for more information.
2045 pub const TV_INPUT_HDMI1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000110c);
2046
2047 /// Represents the logical "TV Input HDMI 2" key on the keyboard.
2048 ///
2049 /// See the function `RawKeyEvent.logicalKey` for more information.
2050 pub const TV_INPUT_HDMI2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000110d);
2051
2052 /// Represents the logical "TV Input HDMI 3" key on the keyboard.
2053 ///
2054 /// See the function `RawKeyEvent.logicalKey` for more information.
2055 pub const TV_INPUT_HDMI3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000110e);
2056
2057 /// Represents the logical "TV Input HDMI 4" key on the keyboard.
2058 ///
2059 /// See the function `RawKeyEvent.logicalKey` for more information.
2060 pub const TV_INPUT_HDMI4: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000110f);
2061
2062 /// Represents the logical "TV Input VGA 1" key on the keyboard.
2063 ///
2064 /// See the function `RawKeyEvent.logicalKey` for more information.
2065 pub const TV_INPUT_VGA1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001110);
2066
2067 /// Represents the logical "TV Media Context" key on the keyboard.
2068 ///
2069 /// See the function `RawKeyEvent.logicalKey` for more information.
2070 pub const TV_MEDIA_CONTEXT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001111);
2071
2072 /// Represents the logical "TV Network" key on the keyboard.
2073 ///
2074 /// See the function `RawKeyEvent.logicalKey` for more information.
2075 pub const TV_NETWORK: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001112);
2076
2077 /// Represents the logical "TV Number Entry" key on the keyboard.
2078 ///
2079 /// See the function `RawKeyEvent.logicalKey` for more information.
2080 pub const TV_NUMBER_ENTRY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001113);
2081
2082 /// Represents the logical "TV Radio Service" key on the keyboard.
2083 ///
2084 /// See the function `RawKeyEvent.logicalKey` for more information.
2085 pub const TV_RADIO_SERVICE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001114);
2086
2087 /// Represents the logical "TV Satellite" key on the keyboard.
2088 ///
2089 /// See the function `RawKeyEvent.logicalKey` for more information.
2090 pub const TV_SATELLITE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001115);
2091
2092 /// Represents the logical "TV Satellite BS" key on the keyboard.
2093 ///
2094 /// See the function `RawKeyEvent.logicalKey` for more information.
2095 pub const TV_SATELLITE_BS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001116);
2096
2097 /// Represents the logical "TV Satellite CS" key on the keyboard.
2098 ///
2099 /// See the function `RawKeyEvent.logicalKey` for more information.
2100 pub const TV_SATELLITE_CS: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001117);
2101
2102 /// Represents the logical "TV Satellite Toggle" key on the keyboard.
2103 ///
2104 /// See the function `RawKeyEvent.logicalKey` for more information.
2105 pub const TV_SATELLITE_TOGGLE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001118);
2106
2107 /// Represents the logical "TV Terrestrial Analog" key on the keyboard.
2108 ///
2109 /// See the function `RawKeyEvent.logicalKey` for more information.
2110 pub const TV_TERRESTRIAL_ANALOG: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001119);
2111
2112 /// Represents the logical "TV Terrestrial Digital" key on the keyboard.
2113 ///
2114 /// See the function `RawKeyEvent.logicalKey` for more information.
2115 pub const TV_TERRESTRIAL_DIGITAL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000111a);
2116
2117 /// Represents the logical "TV Timer" key on the keyboard.
2118 ///
2119 /// See the function `RawKeyEvent.logicalKey` for more information.
2120 pub const TV_TIMER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0010000111b);
2121
2122 /// Represents the logical "Key 11" key on the keyboard.
2123 ///
2124 /// See the function `RawKeyEvent.logicalKey` for more information.
2125 pub const KEY11: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001201);
2126
2127 /// Represents the logical "Key 12" key on the keyboard.
2128 ///
2129 /// See the function `RawKeyEvent.logicalKey` for more information.
2130 pub const KEY12: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00100001202);
2131
2132 /// Represents the logical "Suspend" key on the keyboard.
2133 ///
2134 /// See the function `RawKeyEvent.logicalKey` for more information.
2135 pub const SUSPEND: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000000);
2136
2137 /// Represents the logical "Resume" key on the keyboard.
2138 ///
2139 /// See the function `RawKeyEvent.logicalKey` for more information.
2140 pub const RESUME: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000001);
2141
2142 /// Represents the logical "Sleep" key on the keyboard.
2143 ///
2144 /// See the function `RawKeyEvent.logicalKey` for more information.
2145 pub const SLEEP: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000002);
2146
2147 /// Represents the logical "Abort" key on the keyboard.
2148 ///
2149 /// See the function `RawKeyEvent.logicalKey` for more information.
2150 pub const ABORT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000003);
2151
2152 /// Represents the logical "Lang 1" key on the keyboard.
2153 ///
2154 /// See the function `RawKeyEvent.logicalKey` for more information.
2155 pub const LANG1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000010);
2156
2157 /// Represents the logical "Lang 2" key on the keyboard.
2158 ///
2159 /// See the function `RawKeyEvent.logicalKey` for more information.
2160 pub const LANG2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000011);
2161
2162 /// Represents the logical "Lang 3" key on the keyboard.
2163 ///
2164 /// See the function `RawKeyEvent.logicalKey` for more information.
2165 pub const LANG3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000012);
2166
2167 /// Represents the logical "Lang 4" key on the keyboard.
2168 ///
2169 /// See the function `RawKeyEvent.logicalKey` for more information.
2170 pub const LANG4: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000013);
2171
2172 /// Represents the logical "Lang 5" key on the keyboard.
2173 ///
2174 /// See the function `RawKeyEvent.logicalKey` for more information.
2175 pub const LANG5: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000014);
2176
2177 /// Represents the logical "Intl Backslash" key on the keyboard.
2178 ///
2179 /// See the function `RawKeyEvent.logicalKey` for more information.
2180 pub const INTL_BACKSLASH: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000020);
2181
2182 /// Represents the logical "Intl Ro" key on the keyboard.
2183 ///
2184 /// See the function `RawKeyEvent.logicalKey` for more information.
2185 pub const INTL_RO: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000021);
2186
2187 /// Represents the logical "Intl Yen" key on the keyboard.
2188 ///
2189 /// See the function `RawKeyEvent.logicalKey` for more information.
2190 pub const INTL_YEN: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000022);
2191
2192 /// Represents the logical "Control Left" key on the keyboard.
2193 ///
2194 /// See the function `RawKeyEvent.logicalKey` for more information.
2195 pub const CONTROL_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000100);
2196
2197 /// Represents the logical "Control Right" key on the keyboard.
2198 ///
2199 /// See the function `RawKeyEvent.logicalKey` for more information.
2200 pub const CONTROL_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000101);
2201
2202 /// Represents the logical "Shift Left" key on the keyboard.
2203 ///
2204 /// See the function `RawKeyEvent.logicalKey` for more information.
2205 pub const SHIFT_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000102);
2206
2207 /// Represents the logical "Shift Right" key on the keyboard.
2208 ///
2209 /// See the function `RawKeyEvent.logicalKey` for more information.
2210 pub const SHIFT_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000103);
2211
2212 /// Represents the logical "Alt Left" key on the keyboard.
2213 ///
2214 /// See the function `RawKeyEvent.logicalKey` for more information.
2215 pub const ALT_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000104);
2216
2217 /// Represents the logical "Alt Right" key on the keyboard.
2218 ///
2219 /// See the function `RawKeyEvent.logicalKey` for more information.
2220 pub const ALT_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000105);
2221
2222 /// Represents the logical "Meta Left" key on the keyboard.
2223 ///
2224 /// See the function `RawKeyEvent.logicalKey` for more information.
2225 pub const META_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000106);
2226
2227 /// Represents the logical "Meta Right" key on the keyboard.
2228 ///
2229 /// See the function `RawKeyEvent.logicalKey` for more information.
2230 pub const META_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000107);
2231
2232 /// Represents the logical "Control" key on the keyboard.
2233 ///
2234 /// This key represents the union of the keys {controlLeft, controlRight} when
2235 /// comparing keys. This key will never be generated directly, its main use is
2236 /// in defining key maps.
2237 pub const CONTROL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x002000001f0);
2238
2239 /// Represents the logical "Shift" key on the keyboard.
2240 ///
2241 /// This key represents the union of the keys {shiftLeft, shiftRight} when
2242 /// comparing keys. This key will never be generated directly, its main use is
2243 /// in defining key maps.
2244 pub const SHIFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x002000001f2);
2245
2246 /// Represents the logical "Alt" key on the keyboard.
2247 ///
2248 /// This key represents the union of the keys {altLeft, altRight} when
2249 /// comparing keys. This key will never be generated directly, its main use is
2250 /// in defining key maps.
2251 pub const ALT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x002000001f4);
2252
2253 /// Represents the logical "Meta" key on the keyboard.
2254 ///
2255 /// This key represents the union of the keys {metaLeft, metaRight} when
2256 /// comparing keys. This key will never be generated directly, its main use is
2257 /// in defining key maps.
2258 pub const META: LogicalKeyboardKey = LogicalKeyboardKey::new(0x002000001f6);
2259
2260 /// Represents the logical "Numpad Enter" key on the keyboard.
2261 ///
2262 /// See the function `RawKeyEvent.logicalKey` for more information.
2263 pub const NUMPAD_ENTER: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000020d);
2264
2265 /// Represents the logical "Numpad Paren Left" key on the keyboard.
2266 ///
2267 /// See the function `RawKeyEvent.logicalKey` for more information.
2268 pub const NUMPAD_PAREN_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000228);
2269
2270 /// Represents the logical "Numpad Paren Right" key on the keyboard.
2271 ///
2272 /// See the function `RawKeyEvent.logicalKey` for more information.
2273 pub const NUMPAD_PAREN_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000229);
2274
2275 /// Represents the logical "Numpad Multiply" key on the keyboard.
2276 ///
2277 /// See the function `RawKeyEvent.logicalKey` for more information.
2278 pub const NUMPAD_MULTIPLY: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000022a);
2279
2280 /// Represents the logical "Numpad Add" key on the keyboard.
2281 ///
2282 /// See the function `RawKeyEvent.logicalKey` for more information.
2283 pub const NUMPAD_ADD: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000022b);
2284
2285 /// Represents the logical "Numpad Comma" key on the keyboard.
2286 ///
2287 /// See the function `RawKeyEvent.logicalKey` for more information.
2288 pub const NUMPAD_COMMA: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000022c);
2289
2290 /// Represents the logical "Numpad Subtract" key on the keyboard.
2291 ///
2292 /// See the function `RawKeyEvent.logicalKey` for more information.
2293 pub const NUMPAD_SUBTRACT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000022d);
2294
2295 /// Represents the logical "Numpad Decimal" key on the keyboard.
2296 ///
2297 /// See the function `RawKeyEvent.logicalKey` for more information.
2298 pub const NUMPAD_DECIMAL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000022e);
2299
2300 /// Represents the logical "Numpad Divide" key on the keyboard.
2301 ///
2302 /// See the function `RawKeyEvent.logicalKey` for more information.
2303 pub const NUMPAD_DIVIDE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000022f);
2304
2305 /// Represents the logical "Numpad 0" key on the keyboard.
2306 ///
2307 /// See the function `RawKeyEvent.logicalKey` for more information.
2308 pub const NUMPAD0: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000230);
2309
2310 /// Represents the logical "Numpad 1" key on the keyboard.
2311 ///
2312 /// See the function `RawKeyEvent.logicalKey` for more information.
2313 pub const NUMPAD1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000231);
2314
2315 /// Represents the logical "Numpad 2" key on the keyboard.
2316 ///
2317 /// See the function `RawKeyEvent.logicalKey` for more information.
2318 pub const NUMPAD2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000232);
2319
2320 /// Represents the logical "Numpad 3" key on the keyboard.
2321 ///
2322 /// See the function `RawKeyEvent.logicalKey` for more information.
2323 pub const NUMPAD3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000233);
2324
2325 /// Represents the logical "Numpad 4" key on the keyboard.
2326 ///
2327 /// See the function `RawKeyEvent.logicalKey` for more information.
2328 pub const NUMPAD4: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000234);
2329
2330 /// Represents the logical "Numpad 5" key on the keyboard.
2331 ///
2332 /// See the function `RawKeyEvent.logicalKey` for more information.
2333 pub const NUMPAD5: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000235);
2334
2335 /// Represents the logical "Numpad 6" key on the keyboard.
2336 ///
2337 /// See the function `RawKeyEvent.logicalKey` for more information.
2338 pub const NUMPAD6: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000236);
2339
2340 /// Represents the logical "Numpad 7" key on the keyboard.
2341 ///
2342 /// See the function `RawKeyEvent.logicalKey` for more information.
2343 pub const NUMPAD7: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000237);
2344
2345 /// Represents the logical "Numpad 8" key on the keyboard.
2346 ///
2347 /// See the function `RawKeyEvent.logicalKey` for more information.
2348 pub const NUMPAD8: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000238);
2349
2350 /// Represents the logical "Numpad 9" key on the keyboard.
2351 ///
2352 /// See the function `RawKeyEvent.logicalKey` for more information.
2353 pub const NUMPAD9: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000239);
2354
2355 /// Represents the logical "Numpad Equal" key on the keyboard.
2356 ///
2357 /// See the function `RawKeyEvent.logicalKey` for more information.
2358 pub const NUMPAD_EQUAL: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000023d);
2359
2360 /// Represents the logical "Game Button 1" key on the keyboard.
2361 ///
2362 /// See the function `RawKeyEvent.logicalKey` for more information.
2363 pub const GAME_BUTTON1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000301);
2364
2365 /// Represents the logical "Game Button 2" key on the keyboard.
2366 ///
2367 /// See the function `RawKeyEvent.logicalKey` for more information.
2368 pub const GAME_BUTTON2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000302);
2369
2370 /// Represents the logical "Game Button 3" key on the keyboard.
2371 ///
2372 /// See the function `RawKeyEvent.logicalKey` for more information.
2373 pub const GAME_BUTTON3: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000303);
2374
2375 /// Represents the logical "Game Button 4" key on the keyboard.
2376 ///
2377 /// See the function `RawKeyEvent.logicalKey` for more information.
2378 pub const GAME_BUTTON4: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000304);
2379
2380 /// Represents the logical "Game Button 5" key on the keyboard.
2381 ///
2382 /// See the function `RawKeyEvent.logicalKey` for more information.
2383 pub const GAME_BUTTON5: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000305);
2384
2385 /// Represents the logical "Game Button 6" key on the keyboard.
2386 ///
2387 /// See the function `RawKeyEvent.logicalKey` for more information.
2388 pub const GAME_BUTTON6: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000306);
2389
2390 /// Represents the logical "Game Button 7" key on the keyboard.
2391 ///
2392 /// See the function `RawKeyEvent.logicalKey` for more information.
2393 pub const GAME_BUTTON7: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000307);
2394
2395 /// Represents the logical "Game Button 8" key on the keyboard.
2396 ///
2397 /// See the function `RawKeyEvent.logicalKey` for more information.
2398 pub const GAME_BUTTON8: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000308);
2399
2400 /// Represents the logical "Game Button 9" key on the keyboard.
2401 ///
2402 /// See the function `RawKeyEvent.logicalKey` for more information.
2403 pub const GAME_BUTTON9: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000309);
2404
2405 /// Represents the logical "Game Button 10" key on the keyboard.
2406 ///
2407 /// See the function `RawKeyEvent.logicalKey` for more information.
2408 pub const GAME_BUTTON10: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000030a);
2409
2410 /// Represents the logical "Game Button 11" key on the keyboard.
2411 ///
2412 /// See the function `RawKeyEvent.logicalKey` for more information.
2413 pub const GAME_BUTTON11: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000030b);
2414
2415 /// Represents the logical "Game Button 12" key on the keyboard.
2416 ///
2417 /// See the function `RawKeyEvent.logicalKey` for more information.
2418 pub const GAME_BUTTON12: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000030c);
2419
2420 /// Represents the logical "Game Button 13" key on the keyboard.
2421 ///
2422 /// See the function `RawKeyEvent.logicalKey` for more information.
2423 pub const GAME_BUTTON13: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000030d);
2424
2425 /// Represents the logical "Game Button 14" key on the keyboard.
2426 ///
2427 /// See the function `RawKeyEvent.logicalKey` for more information.
2428 pub const GAME_BUTTON14: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000030e);
2429
2430 /// Represents the logical "Game Button 15" key on the keyboard.
2431 ///
2432 /// See the function `RawKeyEvent.logicalKey` for more information.
2433 pub const GAME_BUTTON15: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000030f);
2434
2435 /// Represents the logical "Game Button 16" key on the keyboard.
2436 ///
2437 /// See the function `RawKeyEvent.logicalKey` for more information.
2438 pub const GAME_BUTTON16: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000310);
2439
2440 /// Represents the logical "Game Button A" key on the keyboard.
2441 ///
2442 /// See the function `RawKeyEvent.logicalKey` for more information.
2443 pub const GAME_BUTTON_A: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000311);
2444
2445 /// Represents the logical "Game Button B" key on the keyboard.
2446 ///
2447 /// See the function `RawKeyEvent.logicalKey` for more information.
2448 pub const GAME_BUTTON_B: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000312);
2449
2450 /// Represents the logical "Game Button C" key on the keyboard.
2451 ///
2452 /// See the function `RawKeyEvent.logicalKey` for more information.
2453 pub const GAME_BUTTON_C: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000313);
2454
2455 /// Represents the logical "Game Button Left 1" key on the keyboard.
2456 ///
2457 /// See the function `RawKeyEvent.logicalKey` for more information.
2458 pub const GAME_BUTTON_LEFT1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000314);
2459
2460 /// Represents the logical "Game Button Left 2" key on the keyboard.
2461 ///
2462 /// See the function `RawKeyEvent.logicalKey` for more information.
2463 pub const GAME_BUTTON_LEFT2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000315);
2464
2465 /// Represents the logical "Game Button Mode" key on the keyboard.
2466 ///
2467 /// See the function `RawKeyEvent.logicalKey` for more information.
2468 pub const GAME_BUTTON_MODE: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000316);
2469
2470 /// Represents the logical "Game Button Right 1" key on the keyboard.
2471 ///
2472 /// See the function `RawKeyEvent.logicalKey` for more information.
2473 pub const GAME_BUTTON_RIGHT1: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000317);
2474
2475 /// Represents the logical "Game Button Right 2" key on the keyboard.
2476 ///
2477 /// See the function `RawKeyEvent.logicalKey` for more information.
2478 pub const GAME_BUTTON_RIGHT2: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000318);
2479
2480 /// Represents the logical "Game Button Select" key on the keyboard.
2481 ///
2482 /// See the function `RawKeyEvent.logicalKey` for more information.
2483 pub const GAME_BUTTON_SELECT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x00200000319);
2484
2485 /// Represents the logical "Game Button Start" key on the keyboard.
2486 ///
2487 /// See the function `RawKeyEvent.logicalKey` for more information.
2488 pub const GAME_BUTTON_START: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000031a);
2489
2490 /// Represents the logical "Game Button Thumb Left" key on the keyboard.
2491 ///
2492 /// See the function `RawKeyEvent.logicalKey` for more information.
2493 pub const GAME_BUTTON_THUMB_LEFT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000031b);
2494
2495 /// Represents the logical "Game Button Thumb Right" key on the keyboard.
2496 ///
2497 /// See the function `RawKeyEvent.logicalKey` for more information.
2498 pub const GAME_BUTTON_THUMB_RIGHT: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000031c);
2499
2500 /// Represents the logical "Game Button X" key on the keyboard.
2501 ///
2502 /// See the function `RawKeyEvent.logicalKey` for more information.
2503 pub const GAME_BUTTON_X: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000031d);
2504
2505 /// Represents the logical "Game Button Y" key on the keyboard.
2506 ///
2507 /// See the function `RawKeyEvent.logicalKey` for more information.
2508 pub const GAME_BUTTON_Y: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000031e);
2509
2510 /// Represents the logical "Game Button Z" key on the keyboard.
2511 ///
2512 /// See the function `RawKeyEvent.logicalKey` for more information.
2513 pub const GAME_BUTTON_Z: LogicalKeyboardKey = LogicalKeyboardKey::new(0x0020000031f);
2514
2515 /// All predefined constant [`LogicalKeyboardKey`]s.
2516 pub fn known_logical_keys() -> impl Iterator<Item = LogicalKeyboardKey> {
2517 KNOWN_LOGICAL_KEYS.iter().copied()
2518 }
2519}
2520
2521impl Debug for LogicalKeyboardKey {
2522 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2523 write!(
2524 f,
2525 "LogicalKeyboardKey(keyId: 0x{:08x}, keyLabel: {}",
2526 self.key_id,
2527 self.key_label()
2528 )?;
2529 if let Some(debug_name) = self.debug_name() {
2530 write!(f, ", debugName: {debug_name}")?;
2531 }
2532 f.write_str(")")
2533 }
2534}
2535
2536/// Dart's `Set.expand`: every element is replaced by its entry in `table`, or kept
2537/// as itself when the table has none.
2538fn expand_with(
2539 input: &HashSet<LogicalKeyboardKey>,
2540 table: fn(LogicalKeyboardKey) -> Option<&'static [LogicalKeyboardKey]>,
2541) -> HashSet<LogicalKeyboardKey> {
2542 let mut result = HashSet::new();
2543 for &element in input {
2544 match table(element) {
2545 Some(replacements) => result.extend(replacements.iter().copied()),
2546 None => {
2547 result.insert(element);
2548 }
2549 }
2550 }
2551 result
2552}
2553
2554/// A type with constants that describe the keys that are returned from
2555/// `RawKeyEvent.physicalKey`.
2556///
2557/// [`PhysicalKeyboardKey`]s are used to describe and test for keys in a particular
2558/// location on a keyboard. The keys are described by the USB HID usage code that
2559/// the key would produce, ignoring the key map, modifier keys (like SHIFT), and
2560/// the label on the key.
2561///
2562/// This is contrast to [`LogicalKeyboardKey`], which represents a logical key
2563/// interpreted in the context of modifiers, modes, and/or keyboard layouts.
2564///
2565/// For instance, if you wanted a game where the key next to the CAPS LOCK (the
2566/// "A" key on a QWERTY keyboard) moved the player to the left, you'd want to
2567/// look at the physical key to make sure that regardless of the character the
2568/// key produces, you got the key that is in that location on the keyboard.
2569#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
2570pub struct PhysicalKeyboardKey {
2571 /// The unique USB HID usage ID of this physical key on the keyboard.
2572 ///
2573 /// Due to the variations in platform APIs, this may not be the actual HID
2574 /// usage code from the hardware, but a value derived from available
2575 /// information on the platform.
2576 ///
2577 /// See <https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf>
2578 /// for the HID usage values and their meanings.
2579 pub usb_hid_usage: u64,
2580}
2581
2582impl KeyboardKey for PhysicalKeyboardKey {}
2583
2584impl PhysicalKeyboardKey {
2585 /// Creates a new [`PhysicalKeyboardKey`] for a USB HID usage.
2586 pub const fn new(usb_hid_usage: u64) -> PhysicalKeyboardKey {
2587 PhysicalKeyboardKey { usb_hid_usage }
2588 }
2589
2590 /// The debug string to print for this keyboard key, which will be `None` in
2591 /// release mode.
2592 pub fn debug_name(&self) -> Option<String> {
2593 if !cfg!(debug_assertions) {
2594 return None;
2595 }
2596 Some(
2597 debug_name_of(self.usb_hid_usage)
2598 .map(str::to_owned)
2599 .unwrap_or_else(|| format!("Key with ID 0x{:08x}", self.usb_hid_usage)),
2600 )
2601 }
2602
2603 /// Finds a known [`PhysicalKeyboardKey`] that matches the given USB HID usage
2604 /// code.
2605 pub fn find_key_by_code(usage_code: u64) -> Option<PhysicalKeyboardKey> {
2606 KNOWN_PHYSICAL_KEYS
2607 .binary_search_by_key(&usage_code, |key| key.usb_hid_usage)
2608 .ok()
2609 .map(|index| KNOWN_PHYSICAL_KEYS[index])
2610 }
2611
2612 // Key constants for all keyboard keys in the USB HID specification at the
2613 // time Flutter was built.
2614
2615 /// Represents the location of the "Hyper" key on a generalized keyboard.
2616 ///
2617 /// See the function `RawKeyEvent.physicalKey` for more information.
2618 pub const HYPER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000010);
2619
2620 /// Represents the location of the "Super Key" key on a generalized keyboard.
2621 ///
2622 /// See the function `RawKeyEvent.physicalKey` for more information.
2623 pub const SUPER_KEY: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000011);
2624
2625 /// Represents the location of the "Fn" key on a generalized keyboard.
2626 ///
2627 /// See the function `RawKeyEvent.physicalKey` for more information.
2628 pub const FN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000012);
2629
2630 /// Represents the location of the "Fn Lock" key on a generalized keyboard.
2631 ///
2632 /// See the function `RawKeyEvent.physicalKey` for more information.
2633 pub const FN_LOCK: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000013);
2634
2635 /// Represents the location of the "Suspend" key on a generalized keyboard.
2636 ///
2637 /// See the function `RawKeyEvent.physicalKey` for more information.
2638 pub const SUSPEND: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000014);
2639
2640 /// Represents the location of the "Resume" key on a generalized keyboard.
2641 ///
2642 /// See the function `RawKeyEvent.physicalKey` for more information.
2643 pub const RESUME: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000015);
2644
2645 /// Represents the location of the "Turbo" key on a generalized keyboard.
2646 ///
2647 /// See the function `RawKeyEvent.physicalKey` for more information.
2648 pub const TURBO: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000016);
2649
2650 /// Represents the location of the "Privacy Screen Toggle" key on a
2651 /// generalized keyboard.
2652 ///
2653 /// See the function `RawKeyEvent.physicalKey` for more information.
2654 pub const PRIVACY_SCREEN_TOGGLE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000017);
2655
2656 /// Represents the location of the "Microphone Mute Toggle" key on a
2657 /// generalized keyboard.
2658 ///
2659 /// See the function `RawKeyEvent.physicalKey` for more information.
2660 pub const MICROPHONE_MUTE_TOGGLE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00000018);
2661
2662 /// Represents the location of the "Sleep" key on a generalized keyboard.
2663 ///
2664 /// See the function `RawKeyEvent.physicalKey` for more information.
2665 pub const SLEEP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00010082);
2666
2667 /// Represents the location of the "Wake Up" key on a generalized keyboard.
2668 ///
2669 /// See the function `RawKeyEvent.physicalKey` for more information.
2670 pub const WAKE_UP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00010083);
2671
2672 /// Represents the location of the "Display Toggle Int Ext" key on a
2673 /// generalized keyboard.
2674 ///
2675 /// See the function `RawKeyEvent.physicalKey` for more information.
2676 pub const DISPLAY_TOGGLE_INT_EXT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000100b5);
2677
2678 /// Represents the location of the "Game Button 1" key on a generalized
2679 /// keyboard.
2680 ///
2681 /// See the function `RawKeyEvent.physicalKey` for more information.
2682 pub const GAME_BUTTON1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff01);
2683
2684 /// Represents the location of the "Game Button 2" key on a generalized
2685 /// keyboard.
2686 ///
2687 /// See the function `RawKeyEvent.physicalKey` for more information.
2688 pub const GAME_BUTTON2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff02);
2689
2690 /// Represents the location of the "Game Button 3" key on a generalized
2691 /// keyboard.
2692 ///
2693 /// See the function `RawKeyEvent.physicalKey` for more information.
2694 pub const GAME_BUTTON3: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff03);
2695
2696 /// Represents the location of the "Game Button 4" key on a generalized
2697 /// keyboard.
2698 ///
2699 /// See the function `RawKeyEvent.physicalKey` for more information.
2700 pub const GAME_BUTTON4: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff04);
2701
2702 /// Represents the location of the "Game Button 5" key on a generalized
2703 /// keyboard.
2704 ///
2705 /// See the function `RawKeyEvent.physicalKey` for more information.
2706 pub const GAME_BUTTON5: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff05);
2707
2708 /// Represents the location of the "Game Button 6" key on a generalized
2709 /// keyboard.
2710 ///
2711 /// See the function `RawKeyEvent.physicalKey` for more information.
2712 pub const GAME_BUTTON6: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff06);
2713
2714 /// Represents the location of the "Game Button 7" key on a generalized
2715 /// keyboard.
2716 ///
2717 /// See the function `RawKeyEvent.physicalKey` for more information.
2718 pub const GAME_BUTTON7: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff07);
2719
2720 /// Represents the location of the "Game Button 8" key on a generalized
2721 /// keyboard.
2722 ///
2723 /// See the function `RawKeyEvent.physicalKey` for more information.
2724 pub const GAME_BUTTON8: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff08);
2725
2726 /// Represents the location of the "Game Button 9" key on a generalized
2727 /// keyboard.
2728 ///
2729 /// See the function `RawKeyEvent.physicalKey` for more information.
2730 pub const GAME_BUTTON9: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff09);
2731
2732 /// Represents the location of the "Game Button 10" key on a generalized
2733 /// keyboard.
2734 ///
2735 /// See the function `RawKeyEvent.physicalKey` for more information.
2736 pub const GAME_BUTTON10: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff0a);
2737
2738 /// Represents the location of the "Game Button 11" key on a generalized
2739 /// keyboard.
2740 ///
2741 /// See the function `RawKeyEvent.physicalKey` for more information.
2742 pub const GAME_BUTTON11: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff0b);
2743
2744 /// Represents the location of the "Game Button 12" key on a generalized
2745 /// keyboard.
2746 ///
2747 /// See the function `RawKeyEvent.physicalKey` for more information.
2748 pub const GAME_BUTTON12: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff0c);
2749
2750 /// Represents the location of the "Game Button 13" key on a generalized
2751 /// keyboard.
2752 ///
2753 /// See the function `RawKeyEvent.physicalKey` for more information.
2754 pub const GAME_BUTTON13: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff0d);
2755
2756 /// Represents the location of the "Game Button 14" key on a generalized
2757 /// keyboard.
2758 ///
2759 /// See the function `RawKeyEvent.physicalKey` for more information.
2760 pub const GAME_BUTTON14: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff0e);
2761
2762 /// Represents the location of the "Game Button 15" key on a generalized
2763 /// keyboard.
2764 ///
2765 /// See the function `RawKeyEvent.physicalKey` for more information.
2766 pub const GAME_BUTTON15: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff0f);
2767
2768 /// Represents the location of the "Game Button 16" key on a generalized
2769 /// keyboard.
2770 ///
2771 /// See the function `RawKeyEvent.physicalKey` for more information.
2772 pub const GAME_BUTTON16: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff10);
2773
2774 /// Represents the location of the "Game Button A" key on a generalized
2775 /// keyboard.
2776 ///
2777 /// See the function `RawKeyEvent.physicalKey` for more information.
2778 pub const GAME_BUTTON_A: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff11);
2779
2780 /// Represents the location of the "Game Button B" key on a generalized
2781 /// keyboard.
2782 ///
2783 /// See the function `RawKeyEvent.physicalKey` for more information.
2784 pub const GAME_BUTTON_B: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff12);
2785
2786 /// Represents the location of the "Game Button C" key on a generalized
2787 /// keyboard.
2788 ///
2789 /// See the function `RawKeyEvent.physicalKey` for more information.
2790 pub const GAME_BUTTON_C: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff13);
2791
2792 /// Represents the location of the "Game Button Left 1" key on a generalized
2793 /// keyboard.
2794 ///
2795 /// See the function `RawKeyEvent.physicalKey` for more information.
2796 pub const GAME_BUTTON_LEFT1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff14);
2797
2798 /// Represents the location of the "Game Button Left 2" key on a generalized
2799 /// keyboard.
2800 ///
2801 /// See the function `RawKeyEvent.physicalKey` for more information.
2802 pub const GAME_BUTTON_LEFT2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff15);
2803
2804 /// Represents the location of the "Game Button Mode" key on a generalized
2805 /// keyboard.
2806 ///
2807 /// See the function `RawKeyEvent.physicalKey` for more information.
2808 pub const GAME_BUTTON_MODE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff16);
2809
2810 /// Represents the location of the "Game Button Right 1" key on a generalized
2811 /// keyboard.
2812 ///
2813 /// See the function `RawKeyEvent.physicalKey` for more information.
2814 pub const GAME_BUTTON_RIGHT1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff17);
2815
2816 /// Represents the location of the "Game Button Right 2" key on a generalized
2817 /// keyboard.
2818 ///
2819 /// See the function `RawKeyEvent.physicalKey` for more information.
2820 pub const GAME_BUTTON_RIGHT2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff18);
2821
2822 /// Represents the location of the "Game Button Select" key on a generalized
2823 /// keyboard.
2824 ///
2825 /// See the function `RawKeyEvent.physicalKey` for more information.
2826 pub const GAME_BUTTON_SELECT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff19);
2827
2828 /// Represents the location of the "Game Button Start" key on a generalized
2829 /// keyboard.
2830 ///
2831 /// See the function `RawKeyEvent.physicalKey` for more information.
2832 pub const GAME_BUTTON_START: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff1a);
2833
2834 /// Represents the location of the "Game Button Thumb Left" key on a
2835 /// generalized keyboard.
2836 ///
2837 /// See the function `RawKeyEvent.physicalKey` for more information.
2838 pub const GAME_BUTTON_THUMB_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff1b);
2839
2840 /// Represents the location of the "Game Button Thumb Right" key on a
2841 /// generalized keyboard.
2842 ///
2843 /// See the function `RawKeyEvent.physicalKey` for more information.
2844 pub const GAME_BUTTON_THUMB_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff1c);
2845
2846 /// Represents the location of the "Game Button X" key on a generalized
2847 /// keyboard.
2848 ///
2849 /// See the function `RawKeyEvent.physicalKey` for more information.
2850 pub const GAME_BUTTON_X: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff1d);
2851
2852 /// Represents the location of the "Game Button Y" key on a generalized
2853 /// keyboard.
2854 ///
2855 /// See the function `RawKeyEvent.physicalKey` for more information.
2856 pub const GAME_BUTTON_Y: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff1e);
2857
2858 /// Represents the location of the "Game Button Z" key on a generalized
2859 /// keyboard.
2860 ///
2861 /// See the function `RawKeyEvent.physicalKey` for more information.
2862 pub const GAME_BUTTON_Z: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0005ff1f);
2863
2864 /// Represents the location of the "Usb Reserved" key on a generalized
2865 /// keyboard.
2866 ///
2867 /// See the function `RawKeyEvent.physicalKey` for more information.
2868 pub const USB_RESERVED: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070000);
2869
2870 /// Represents the location of the "Usb Error Roll Over" key on a generalized
2871 /// keyboard.
2872 ///
2873 /// See the function `RawKeyEvent.physicalKey` for more information.
2874 pub const USB_ERROR_ROLL_OVER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070001);
2875
2876 /// Represents the location of the "Usb Post Fail" key on a generalized
2877 /// keyboard.
2878 ///
2879 /// See the function `RawKeyEvent.physicalKey` for more information.
2880 pub const USB_POST_FAIL: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070002);
2881
2882 /// Represents the location of the "Usb Error Undefined" key on a generalized
2883 /// keyboard.
2884 ///
2885 /// See the function `RawKeyEvent.physicalKey` for more information.
2886 pub const USB_ERROR_UNDEFINED: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070003);
2887
2888 /// Represents the location of the "Key A" key on a generalized keyboard.
2889 ///
2890 /// See the function `RawKeyEvent.physicalKey` for more information.
2891 pub const KEY_A: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070004);
2892
2893 /// Represents the location of the "Key B" key on a generalized keyboard.
2894 ///
2895 /// See the function `RawKeyEvent.physicalKey` for more information.
2896 pub const KEY_B: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070005);
2897
2898 /// Represents the location of the "Key C" key on a generalized keyboard.
2899 ///
2900 /// See the function `RawKeyEvent.physicalKey` for more information.
2901 pub const KEY_C: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070006);
2902
2903 /// Represents the location of the "Key D" key on a generalized keyboard.
2904 ///
2905 /// See the function `RawKeyEvent.physicalKey` for more information.
2906 pub const KEY_D: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070007);
2907
2908 /// Represents the location of the "Key E" key on a generalized keyboard.
2909 ///
2910 /// See the function `RawKeyEvent.physicalKey` for more information.
2911 pub const KEY_E: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070008);
2912
2913 /// Represents the location of the "Key F" key on a generalized keyboard.
2914 ///
2915 /// See the function `RawKeyEvent.physicalKey` for more information.
2916 pub const KEY_F: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070009);
2917
2918 /// Represents the location of the "Key G" key on a generalized keyboard.
2919 ///
2920 /// See the function `RawKeyEvent.physicalKey` for more information.
2921 pub const KEY_G: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007000a);
2922
2923 /// Represents the location of the "Key H" key on a generalized keyboard.
2924 ///
2925 /// See the function `RawKeyEvent.physicalKey` for more information.
2926 pub const KEY_H: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007000b);
2927
2928 /// Represents the location of the "Key I" key on a generalized keyboard.
2929 ///
2930 /// See the function `RawKeyEvent.physicalKey` for more information.
2931 pub const KEY_I: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007000c);
2932
2933 /// Represents the location of the "Key J" key on a generalized keyboard.
2934 ///
2935 /// See the function `RawKeyEvent.physicalKey` for more information.
2936 pub const KEY_J: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007000d);
2937
2938 /// Represents the location of the "Key K" key on a generalized keyboard.
2939 ///
2940 /// See the function `RawKeyEvent.physicalKey` for more information.
2941 pub const KEY_K: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007000e);
2942
2943 /// Represents the location of the "Key L" key on a generalized keyboard.
2944 ///
2945 /// See the function `RawKeyEvent.physicalKey` for more information.
2946 pub const KEY_L: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007000f);
2947
2948 /// Represents the location of the "Key M" key on a generalized keyboard.
2949 ///
2950 /// See the function `RawKeyEvent.physicalKey` for more information.
2951 pub const KEY_M: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070010);
2952
2953 /// Represents the location of the "Key N" key on a generalized keyboard.
2954 ///
2955 /// See the function `RawKeyEvent.physicalKey` for more information.
2956 pub const KEY_N: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070011);
2957
2958 /// Represents the location of the "Key O" key on a generalized keyboard.
2959 ///
2960 /// See the function `RawKeyEvent.physicalKey` for more information.
2961 pub const KEY_O: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070012);
2962
2963 /// Represents the location of the "Key P" key on a generalized keyboard.
2964 ///
2965 /// See the function `RawKeyEvent.physicalKey` for more information.
2966 pub const KEY_P: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070013);
2967
2968 /// Represents the location of the "Key Q" key on a generalized keyboard.
2969 ///
2970 /// See the function `RawKeyEvent.physicalKey` for more information.
2971 pub const KEY_Q: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070014);
2972
2973 /// Represents the location of the "Key R" key on a generalized keyboard.
2974 ///
2975 /// See the function `RawKeyEvent.physicalKey` for more information.
2976 pub const KEY_R: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070015);
2977
2978 /// Represents the location of the "Key S" key on a generalized keyboard.
2979 ///
2980 /// See the function `RawKeyEvent.physicalKey` for more information.
2981 pub const KEY_S: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070016);
2982
2983 /// Represents the location of the "Key T" key on a generalized keyboard.
2984 ///
2985 /// See the function `RawKeyEvent.physicalKey` for more information.
2986 pub const KEY_T: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070017);
2987
2988 /// Represents the location of the "Key U" key on a generalized keyboard.
2989 ///
2990 /// See the function `RawKeyEvent.physicalKey` for more information.
2991 pub const KEY_U: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070018);
2992
2993 /// Represents the location of the "Key V" key on a generalized keyboard.
2994 ///
2995 /// See the function `RawKeyEvent.physicalKey` for more information.
2996 pub const KEY_V: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070019);
2997
2998 /// Represents the location of the "Key W" key on a generalized keyboard.
2999 ///
3000 /// See the function `RawKeyEvent.physicalKey` for more information.
3001 pub const KEY_W: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007001a);
3002
3003 /// Represents the location of the "Key X" key on a generalized keyboard.
3004 ///
3005 /// See the function `RawKeyEvent.physicalKey` for more information.
3006 pub const KEY_X: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007001b);
3007
3008 /// Represents the location of the "Key Y" key on a generalized keyboard.
3009 ///
3010 /// See the function `RawKeyEvent.physicalKey` for more information.
3011 pub const KEY_Y: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007001c);
3012
3013 /// Represents the location of the "Key Z" key on a generalized keyboard.
3014 ///
3015 /// See the function `RawKeyEvent.physicalKey` for more information.
3016 pub const KEY_Z: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007001d);
3017
3018 /// Represents the location of the "Digit 1" key on a generalized keyboard.
3019 ///
3020 /// See the function `RawKeyEvent.physicalKey` for more information.
3021 pub const DIGIT1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007001e);
3022
3023 /// Represents the location of the "Digit 2" key on a generalized keyboard.
3024 ///
3025 /// See the function `RawKeyEvent.physicalKey` for more information.
3026 pub const DIGIT2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007001f);
3027
3028 /// Represents the location of the "Digit 3" key on a generalized keyboard.
3029 ///
3030 /// See the function `RawKeyEvent.physicalKey` for more information.
3031 pub const DIGIT3: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070020);
3032
3033 /// Represents the location of the "Digit 4" key on a generalized keyboard.
3034 ///
3035 /// See the function `RawKeyEvent.physicalKey` for more information.
3036 pub const DIGIT4: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070021);
3037
3038 /// Represents the location of the "Digit 5" key on a generalized keyboard.
3039 ///
3040 /// See the function `RawKeyEvent.physicalKey` for more information.
3041 pub const DIGIT5: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070022);
3042
3043 /// Represents the location of the "Digit 6" key on a generalized keyboard.
3044 ///
3045 /// See the function `RawKeyEvent.physicalKey` for more information.
3046 pub const DIGIT6: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070023);
3047
3048 /// Represents the location of the "Digit 7" key on a generalized keyboard.
3049 ///
3050 /// See the function `RawKeyEvent.physicalKey` for more information.
3051 pub const DIGIT7: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070024);
3052
3053 /// Represents the location of the "Digit 8" key on a generalized keyboard.
3054 ///
3055 /// See the function `RawKeyEvent.physicalKey` for more information.
3056 pub const DIGIT8: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070025);
3057
3058 /// Represents the location of the "Digit 9" key on a generalized keyboard.
3059 ///
3060 /// See the function `RawKeyEvent.physicalKey` for more information.
3061 pub const DIGIT9: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070026);
3062
3063 /// Represents the location of the "Digit 0" key on a generalized keyboard.
3064 ///
3065 /// See the function `RawKeyEvent.physicalKey` for more information.
3066 pub const DIGIT0: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070027);
3067
3068 /// Represents the location of the "Enter" key on a generalized keyboard.
3069 ///
3070 /// See the function `RawKeyEvent.physicalKey` for more information.
3071 pub const ENTER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070028);
3072
3073 /// Represents the location of the "Escape" key on a generalized keyboard.
3074 ///
3075 /// See the function `RawKeyEvent.physicalKey` for more information.
3076 pub const ESCAPE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070029);
3077
3078 /// Represents the location of the "Backspace" key on a generalized keyboard.
3079 ///
3080 /// See the function `RawKeyEvent.physicalKey` for more information.
3081 pub const BACKSPACE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007002a);
3082
3083 /// Represents the location of the "Tab" key on a generalized keyboard.
3084 ///
3085 /// See the function `RawKeyEvent.physicalKey` for more information.
3086 pub const TAB: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007002b);
3087
3088 /// Represents the location of the "Space" key on a generalized keyboard.
3089 ///
3090 /// See the function `RawKeyEvent.physicalKey` for more information.
3091 pub const SPACE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007002c);
3092
3093 /// Represents the location of the "Minus" key on a generalized keyboard.
3094 ///
3095 /// See the function `RawKeyEvent.physicalKey` for more information.
3096 pub const MINUS: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007002d);
3097
3098 /// Represents the location of the "Equal" key on a generalized keyboard.
3099 ///
3100 /// See the function `RawKeyEvent.physicalKey` for more information.
3101 pub const EQUAL: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007002e);
3102
3103 /// Represents the location of the "Bracket Left" key on a generalized
3104 /// keyboard.
3105 ///
3106 /// See the function `RawKeyEvent.physicalKey` for more information.
3107 pub const BRACKET_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007002f);
3108
3109 /// Represents the location of the "Bracket Right" key on a generalized
3110 /// keyboard.
3111 ///
3112 /// See the function `RawKeyEvent.physicalKey` for more information.
3113 pub const BRACKET_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070030);
3114
3115 /// Represents the location of the "Backslash" key on a generalized keyboard.
3116 ///
3117 /// See the function `RawKeyEvent.physicalKey` for more information.
3118 pub const BACKSLASH: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070031);
3119
3120 /// Represents the location of the "Semicolon" key on a generalized keyboard.
3121 ///
3122 /// See the function `RawKeyEvent.physicalKey` for more information.
3123 pub const SEMICOLON: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070033);
3124
3125 /// Represents the location of the "Quote" key on a generalized keyboard.
3126 ///
3127 /// See the function `RawKeyEvent.physicalKey` for more information.
3128 pub const QUOTE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070034);
3129
3130 /// Represents the location of the "Backquote" key on a generalized keyboard.
3131 ///
3132 /// See the function `RawKeyEvent.physicalKey` for more information.
3133 pub const BACKQUOTE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070035);
3134
3135 /// Represents the location of the "Comma" key on a generalized keyboard.
3136 ///
3137 /// See the function `RawKeyEvent.physicalKey` for more information.
3138 pub const COMMA: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070036);
3139
3140 /// Represents the location of the "Period" key on a generalized keyboard.
3141 ///
3142 /// See the function `RawKeyEvent.physicalKey` for more information.
3143 pub const PERIOD: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070037);
3144
3145 /// Represents the location of the "Slash" key on a generalized keyboard.
3146 ///
3147 /// See the function `RawKeyEvent.physicalKey` for more information.
3148 pub const SLASH: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070038);
3149
3150 /// Represents the location of the "Caps Lock" key on a generalized keyboard.
3151 ///
3152 /// See the function `RawKeyEvent.physicalKey` for more information.
3153 pub const CAPS_LOCK: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070039);
3154
3155 /// Represents the location of the "F1" key on a generalized keyboard.
3156 ///
3157 /// See the function `RawKeyEvent.physicalKey` for more information.
3158 pub const F1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007003a);
3159
3160 /// Represents the location of the "F2" key on a generalized keyboard.
3161 ///
3162 /// See the function `RawKeyEvent.physicalKey` for more information.
3163 pub const F2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007003b);
3164
3165 /// Represents the location of the "F3" key on a generalized keyboard.
3166 ///
3167 /// See the function `RawKeyEvent.physicalKey` for more information.
3168 pub const F3: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007003c);
3169
3170 /// Represents the location of the "F4" key on a generalized keyboard.
3171 ///
3172 /// See the function `RawKeyEvent.physicalKey` for more information.
3173 pub const F4: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007003d);
3174
3175 /// Represents the location of the "F5" key on a generalized keyboard.
3176 ///
3177 /// See the function `RawKeyEvent.physicalKey` for more information.
3178 pub const F5: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007003e);
3179
3180 /// Represents the location of the "F6" key on a generalized keyboard.
3181 ///
3182 /// See the function `RawKeyEvent.physicalKey` for more information.
3183 pub const F6: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007003f);
3184
3185 /// Represents the location of the "F7" key on a generalized keyboard.
3186 ///
3187 /// See the function `RawKeyEvent.physicalKey` for more information.
3188 pub const F7: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070040);
3189
3190 /// Represents the location of the "F8" key on a generalized keyboard.
3191 ///
3192 /// See the function `RawKeyEvent.physicalKey` for more information.
3193 pub const F8: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070041);
3194
3195 /// Represents the location of the "F9" key on a generalized keyboard.
3196 ///
3197 /// See the function `RawKeyEvent.physicalKey` for more information.
3198 pub const F9: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070042);
3199
3200 /// Represents the location of the "F10" key on a generalized keyboard.
3201 ///
3202 /// See the function `RawKeyEvent.physicalKey` for more information.
3203 pub const F10: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070043);
3204
3205 /// Represents the location of the "F11" key on a generalized keyboard.
3206 ///
3207 /// See the function `RawKeyEvent.physicalKey` for more information.
3208 pub const F11: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070044);
3209
3210 /// Represents the location of the "F12" key on a generalized keyboard.
3211 ///
3212 /// See the function `RawKeyEvent.physicalKey` for more information.
3213 pub const F12: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070045);
3214
3215 /// Represents the location of the "Print Screen" key on a generalized
3216 /// keyboard.
3217 ///
3218 /// See the function `RawKeyEvent.physicalKey` for more information.
3219 pub const PRINT_SCREEN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070046);
3220
3221 /// Represents the location of the "Scroll Lock" key on a generalized
3222 /// keyboard.
3223 ///
3224 /// See the function `RawKeyEvent.physicalKey` for more information.
3225 pub const SCROLL_LOCK: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070047);
3226
3227 /// Represents the location of the "Pause" key on a generalized keyboard.
3228 ///
3229 /// See the function `RawKeyEvent.physicalKey` for more information.
3230 pub const PAUSE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070048);
3231
3232 /// Represents the location of the "Insert" key on a generalized keyboard.
3233 ///
3234 /// See the function `RawKeyEvent.physicalKey` for more information.
3235 pub const INSERT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070049);
3236
3237 /// Represents the location of the "Home" key on a generalized keyboard.
3238 ///
3239 /// See the function `RawKeyEvent.physicalKey` for more information.
3240 pub const HOME: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007004a);
3241
3242 /// Represents the location of the "Page Up" key on a generalized keyboard.
3243 ///
3244 /// See the function `RawKeyEvent.physicalKey` for more information.
3245 pub const PAGE_UP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007004b);
3246
3247 /// Represents the location of the "Delete" key on a generalized keyboard.
3248 ///
3249 /// See the function `RawKeyEvent.physicalKey` for more information.
3250 pub const DELETE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007004c);
3251
3252 /// Represents the location of the "End" key on a generalized keyboard.
3253 ///
3254 /// See the function `RawKeyEvent.physicalKey` for more information.
3255 pub const END: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007004d);
3256
3257 /// Represents the location of the "Page Down" key on a generalized keyboard.
3258 ///
3259 /// See the function `RawKeyEvent.physicalKey` for more information.
3260 pub const PAGE_DOWN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007004e);
3261
3262 /// Represents the location of the "Arrow Right" key on a generalized
3263 /// keyboard.
3264 ///
3265 /// See the function `RawKeyEvent.physicalKey` for more information.
3266 pub const ARROW_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007004f);
3267
3268 /// Represents the location of the "Arrow Left" key on a generalized keyboard.
3269 ///
3270 /// See the function `RawKeyEvent.physicalKey` for more information.
3271 pub const ARROW_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070050);
3272
3273 /// Represents the location of the "Arrow Down" key on a generalized keyboard.
3274 ///
3275 /// See the function `RawKeyEvent.physicalKey` for more information.
3276 pub const ARROW_DOWN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070051);
3277
3278 /// Represents the location of the "Arrow Up" key on a generalized keyboard.
3279 ///
3280 /// See the function `RawKeyEvent.physicalKey` for more information.
3281 pub const ARROW_UP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070052);
3282
3283 /// Represents the location of the "Num Lock" key on a generalized keyboard.
3284 ///
3285 /// See the function `RawKeyEvent.physicalKey` for more information.
3286 pub const NUM_LOCK: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070053);
3287
3288 /// Represents the location of the "Numpad Divide" key on a generalized
3289 /// keyboard.
3290 ///
3291 /// See the function `RawKeyEvent.physicalKey` for more information.
3292 pub const NUMPAD_DIVIDE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070054);
3293
3294 /// Represents the location of the "Numpad Multiply" key on a generalized
3295 /// keyboard.
3296 ///
3297 /// See the function `RawKeyEvent.physicalKey` for more information.
3298 pub const NUMPAD_MULTIPLY: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070055);
3299
3300 /// Represents the location of the "Numpad Subtract" key on a generalized
3301 /// keyboard.
3302 ///
3303 /// See the function `RawKeyEvent.physicalKey` for more information.
3304 pub const NUMPAD_SUBTRACT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070056);
3305
3306 /// Represents the location of the "Numpad Add" key on a generalized keyboard.
3307 ///
3308 /// See the function `RawKeyEvent.physicalKey` for more information.
3309 pub const NUMPAD_ADD: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070057);
3310
3311 /// Represents the location of the "Numpad Enter" key on a generalized
3312 /// keyboard.
3313 ///
3314 /// See the function `RawKeyEvent.physicalKey` for more information.
3315 pub const NUMPAD_ENTER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070058);
3316
3317 /// Represents the location of the "Numpad 1" key on a generalized keyboard.
3318 ///
3319 /// See the function `RawKeyEvent.physicalKey` for more information.
3320 pub const NUMPAD1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070059);
3321
3322 /// Represents the location of the "Numpad 2" key on a generalized keyboard.
3323 ///
3324 /// See the function `RawKeyEvent.physicalKey` for more information.
3325 pub const NUMPAD2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007005a);
3326
3327 /// Represents the location of the "Numpad 3" key on a generalized keyboard.
3328 ///
3329 /// See the function `RawKeyEvent.physicalKey` for more information.
3330 pub const NUMPAD3: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007005b);
3331
3332 /// Represents the location of the "Numpad 4" key on a generalized keyboard.
3333 ///
3334 /// See the function `RawKeyEvent.physicalKey` for more information.
3335 pub const NUMPAD4: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007005c);
3336
3337 /// Represents the location of the "Numpad 5" key on a generalized keyboard.
3338 ///
3339 /// See the function `RawKeyEvent.physicalKey` for more information.
3340 pub const NUMPAD5: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007005d);
3341
3342 /// Represents the location of the "Numpad 6" key on a generalized keyboard.
3343 ///
3344 /// See the function `RawKeyEvent.physicalKey` for more information.
3345 pub const NUMPAD6: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007005e);
3346
3347 /// Represents the location of the "Numpad 7" key on a generalized keyboard.
3348 ///
3349 /// See the function `RawKeyEvent.physicalKey` for more information.
3350 pub const NUMPAD7: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007005f);
3351
3352 /// Represents the location of the "Numpad 8" key on a generalized keyboard.
3353 ///
3354 /// See the function `RawKeyEvent.physicalKey` for more information.
3355 pub const NUMPAD8: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070060);
3356
3357 /// Represents the location of the "Numpad 9" key on a generalized keyboard.
3358 ///
3359 /// See the function `RawKeyEvent.physicalKey` for more information.
3360 pub const NUMPAD9: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070061);
3361
3362 /// Represents the location of the "Numpad 0" key on a generalized keyboard.
3363 ///
3364 /// See the function `RawKeyEvent.physicalKey` for more information.
3365 pub const NUMPAD0: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070062);
3366
3367 /// Represents the location of the "Numpad Decimal" key on a generalized
3368 /// keyboard.
3369 ///
3370 /// See the function `RawKeyEvent.physicalKey` for more information.
3371 pub const NUMPAD_DECIMAL: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070063);
3372
3373 /// Represents the location of the "Intl Backslash" key on a generalized
3374 /// keyboard.
3375 ///
3376 /// See the function `RawKeyEvent.physicalKey` for more information.
3377 pub const INTL_BACKSLASH: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070064);
3378
3379 /// Represents the location of the "Context Menu" key on a generalized
3380 /// keyboard.
3381 ///
3382 /// See the function `RawKeyEvent.physicalKey` for more information.
3383 pub const CONTEXT_MENU: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070065);
3384
3385 /// Represents the location of the "Power" key on a generalized keyboard.
3386 ///
3387 /// See the function `RawKeyEvent.physicalKey` for more information.
3388 pub const POWER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070066);
3389
3390 /// Represents the location of the "Numpad Equal" key on a generalized
3391 /// keyboard.
3392 ///
3393 /// See the function `RawKeyEvent.physicalKey` for more information.
3394 pub const NUMPAD_EQUAL: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070067);
3395
3396 /// Represents the location of the "F13" key on a generalized keyboard.
3397 ///
3398 /// See the function `RawKeyEvent.physicalKey` for more information.
3399 pub const F13: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070068);
3400
3401 /// Represents the location of the "F14" key on a generalized keyboard.
3402 ///
3403 /// See the function `RawKeyEvent.physicalKey` for more information.
3404 pub const F14: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070069);
3405
3406 /// Represents the location of the "F15" key on a generalized keyboard.
3407 ///
3408 /// See the function `RawKeyEvent.physicalKey` for more information.
3409 pub const F15: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007006a);
3410
3411 /// Represents the location of the "F16" key on a generalized keyboard.
3412 ///
3413 /// See the function `RawKeyEvent.physicalKey` for more information.
3414 pub const F16: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007006b);
3415
3416 /// Represents the location of the "F17" key on a generalized keyboard.
3417 ///
3418 /// See the function `RawKeyEvent.physicalKey` for more information.
3419 pub const F17: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007006c);
3420
3421 /// Represents the location of the "F18" key on a generalized keyboard.
3422 ///
3423 /// See the function `RawKeyEvent.physicalKey` for more information.
3424 pub const F18: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007006d);
3425
3426 /// Represents the location of the "F19" key on a generalized keyboard.
3427 ///
3428 /// See the function `RawKeyEvent.physicalKey` for more information.
3429 pub const F19: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007006e);
3430
3431 /// Represents the location of the "F20" key on a generalized keyboard.
3432 ///
3433 /// See the function `RawKeyEvent.physicalKey` for more information.
3434 pub const F20: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007006f);
3435
3436 /// Represents the location of the "F21" key on a generalized keyboard.
3437 ///
3438 /// See the function `RawKeyEvent.physicalKey` for more information.
3439 pub const F21: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070070);
3440
3441 /// Represents the location of the "F22" key on a generalized keyboard.
3442 ///
3443 /// See the function `RawKeyEvent.physicalKey` for more information.
3444 pub const F22: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070071);
3445
3446 /// Represents the location of the "F23" key on a generalized keyboard.
3447 ///
3448 /// See the function `RawKeyEvent.physicalKey` for more information.
3449 pub const F23: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070072);
3450
3451 /// Represents the location of the "F24" key on a generalized keyboard.
3452 ///
3453 /// See the function `RawKeyEvent.physicalKey` for more information.
3454 pub const F24: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070073);
3455
3456 /// Represents the location of the "Open" key on a generalized keyboard.
3457 ///
3458 /// See the function `RawKeyEvent.physicalKey` for more information.
3459 pub const OPEN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070074);
3460
3461 /// Represents the location of the "Help" key on a generalized keyboard.
3462 ///
3463 /// See the function `RawKeyEvent.physicalKey` for more information.
3464 pub const HELP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070075);
3465
3466 /// Represents the location of the "Select" key on a generalized keyboard.
3467 ///
3468 /// See the function `RawKeyEvent.physicalKey` for more information.
3469 pub const SELECT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070077);
3470
3471 /// Represents the location of the "Again" key on a generalized keyboard.
3472 ///
3473 /// See the function `RawKeyEvent.physicalKey` for more information.
3474 pub const AGAIN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070079);
3475
3476 /// Represents the location of the "Undo" key on a generalized keyboard.
3477 ///
3478 /// See the function `RawKeyEvent.physicalKey` for more information.
3479 pub const UNDO: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007007a);
3480
3481 /// Represents the location of the "Cut" key on a generalized keyboard.
3482 ///
3483 /// See the function `RawKeyEvent.physicalKey` for more information.
3484 pub const CUT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007007b);
3485
3486 /// Represents the location of the "Copy" key on a generalized keyboard.
3487 ///
3488 /// See the function `RawKeyEvent.physicalKey` for more information.
3489 pub const COPY: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007007c);
3490
3491 /// Represents the location of the "Paste" key on a generalized keyboard.
3492 ///
3493 /// See the function `RawKeyEvent.physicalKey` for more information.
3494 pub const PASTE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007007d);
3495
3496 /// Represents the location of the "Find" key on a generalized keyboard.
3497 ///
3498 /// See the function `RawKeyEvent.physicalKey` for more information.
3499 pub const FIND: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007007e);
3500
3501 /// Represents the location of the "Audio Volume Mute" key on a generalized
3502 /// keyboard.
3503 ///
3504 /// See the function `RawKeyEvent.physicalKey` for more information.
3505 pub const AUDIO_VOLUME_MUTE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007007f);
3506
3507 /// Represents the location of the "Audio Volume Up" key on a generalized
3508 /// keyboard.
3509 ///
3510 /// See the function `RawKeyEvent.physicalKey` for more information.
3511 pub const AUDIO_VOLUME_UP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070080);
3512
3513 /// Represents the location of the "Audio Volume Down" key on a generalized
3514 /// keyboard.
3515 ///
3516 /// See the function `RawKeyEvent.physicalKey` for more information.
3517 pub const AUDIO_VOLUME_DOWN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070081);
3518
3519 /// Represents the location of the "Numpad Comma" key on a generalized
3520 /// keyboard.
3521 ///
3522 /// See the function `RawKeyEvent.physicalKey` for more information.
3523 pub const NUMPAD_COMMA: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070085);
3524
3525 /// Represents the location of the "Intl Ro" key on a generalized keyboard.
3526 ///
3527 /// See the function `RawKeyEvent.physicalKey` for more information.
3528 pub const INTL_RO: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070087);
3529
3530 /// Represents the location of the "Kana Mode" key on a generalized keyboard.
3531 ///
3532 /// See the function `RawKeyEvent.physicalKey` for more information.
3533 pub const KANA_MODE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070088);
3534
3535 /// Represents the location of the "Intl Yen" key on a generalized keyboard.
3536 ///
3537 /// See the function `RawKeyEvent.physicalKey` for more information.
3538 pub const INTL_YEN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070089);
3539
3540 /// Represents the location of the "Convert" key on a generalized keyboard.
3541 ///
3542 /// See the function `RawKeyEvent.physicalKey` for more information.
3543 pub const CONVERT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007008a);
3544
3545 /// Represents the location of the "Non Convert" key on a generalized
3546 /// keyboard.
3547 ///
3548 /// See the function `RawKeyEvent.physicalKey` for more information.
3549 pub const NON_CONVERT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007008b);
3550
3551 /// Represents the location of the "Lang 1" key on a generalized keyboard.
3552 ///
3553 /// See the function `RawKeyEvent.physicalKey` for more information.
3554 pub const LANG1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070090);
3555
3556 /// Represents the location of the "Lang 2" key on a generalized keyboard.
3557 ///
3558 /// See the function `RawKeyEvent.physicalKey` for more information.
3559 pub const LANG2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070091);
3560
3561 /// Represents the location of the "Lang 3" key on a generalized keyboard.
3562 ///
3563 /// See the function `RawKeyEvent.physicalKey` for more information.
3564 pub const LANG3: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070092);
3565
3566 /// Represents the location of the "Lang 4" key on a generalized keyboard.
3567 ///
3568 /// See the function `RawKeyEvent.physicalKey` for more information.
3569 pub const LANG4: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070093);
3570
3571 /// Represents the location of the "Lang 5" key on a generalized keyboard.
3572 ///
3573 /// See the function `RawKeyEvent.physicalKey` for more information.
3574 pub const LANG5: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x00070094);
3575
3576 /// Represents the location of the "Abort" key on a generalized keyboard.
3577 ///
3578 /// See the function `RawKeyEvent.physicalKey` for more information.
3579 pub const ABORT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x0007009b);
3580
3581 /// Represents the location of the "Props" key on a generalized keyboard.
3582 ///
3583 /// See the function `RawKeyEvent.physicalKey` for more information.
3584 pub const PROPS: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700a3);
3585
3586 /// Represents the location of the "Numpad Paren Left" key on a generalized
3587 /// keyboard.
3588 ///
3589 /// See the function `RawKeyEvent.physicalKey` for more information.
3590 pub const NUMPAD_PAREN_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700b6);
3591
3592 /// Represents the location of the "Numpad Paren Right" key on a generalized
3593 /// keyboard.
3594 ///
3595 /// See the function `RawKeyEvent.physicalKey` for more information.
3596 pub const NUMPAD_PAREN_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700b7);
3597
3598 /// Represents the location of the "Numpad Backspace" key on a generalized
3599 /// keyboard.
3600 ///
3601 /// See the function `RawKeyEvent.physicalKey` for more information.
3602 pub const NUMPAD_BACKSPACE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700bb);
3603
3604 /// Represents the location of the "Numpad Memory Store" key on a generalized
3605 /// keyboard.
3606 ///
3607 /// See the function `RawKeyEvent.physicalKey` for more information.
3608 pub const NUMPAD_MEMORY_STORE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d0);
3609
3610 /// Represents the location of the "Numpad Memory Recall" key on a generalized
3611 /// keyboard.
3612 ///
3613 /// See the function `RawKeyEvent.physicalKey` for more information.
3614 pub const NUMPAD_MEMORY_RECALL: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d1);
3615
3616 /// Represents the location of the "Numpad Memory Clear" key on a generalized
3617 /// keyboard.
3618 ///
3619 /// See the function `RawKeyEvent.physicalKey` for more information.
3620 pub const NUMPAD_MEMORY_CLEAR: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d2);
3621
3622 /// Represents the location of the "Numpad Memory Add" key on a generalized
3623 /// keyboard.
3624 ///
3625 /// See the function `RawKeyEvent.physicalKey` for more information.
3626 pub const NUMPAD_MEMORY_ADD: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d3);
3627
3628 /// Represents the location of the "Numpad Memory Subtract" key on a
3629 /// generalized keyboard.
3630 ///
3631 /// See the function `RawKeyEvent.physicalKey` for more information.
3632 pub const NUMPAD_MEMORY_SUBTRACT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d4);
3633
3634 /// Represents the location of the "Numpad Sign Change" key on a generalized
3635 /// keyboard.
3636 ///
3637 /// See the function `RawKeyEvent.physicalKey` for more information.
3638 pub const NUMPAD_SIGN_CHANGE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d7);
3639
3640 /// Represents the location of the "Numpad Clear" key on a generalized
3641 /// keyboard.
3642 ///
3643 /// See the function `RawKeyEvent.physicalKey` for more information.
3644 pub const NUMPAD_CLEAR: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d8);
3645
3646 /// Represents the location of the "Numpad Clear Entry" key on a generalized
3647 /// keyboard.
3648 ///
3649 /// See the function `RawKeyEvent.physicalKey` for more information.
3650 pub const NUMPAD_CLEAR_ENTRY: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700d9);
3651
3652 /// Represents the location of the "Control Left" key on a generalized
3653 /// keyboard.
3654 ///
3655 /// See the function `RawKeyEvent.physicalKey` for more information.
3656 pub const CONTROL_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e0);
3657
3658 /// Represents the location of the "Shift Left" key on a generalized keyboard.
3659 ///
3660 /// See the function `RawKeyEvent.physicalKey` for more information.
3661 pub const SHIFT_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e1);
3662
3663 /// Represents the location of the "Alt Left" key on a generalized keyboard.
3664 ///
3665 /// See the function `RawKeyEvent.physicalKey` for more information.
3666 pub const ALT_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e2);
3667
3668 /// Represents the location of the "Meta Left" key on a generalized keyboard.
3669 ///
3670 /// See the function `RawKeyEvent.physicalKey` for more information.
3671 pub const META_LEFT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e3);
3672
3673 /// Represents the location of the "Control Right" key on a generalized
3674 /// keyboard.
3675 ///
3676 /// See the function `RawKeyEvent.physicalKey` for more information.
3677 pub const CONTROL_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e4);
3678
3679 /// Represents the location of the "Shift Right" key on a generalized
3680 /// keyboard.
3681 ///
3682 /// See the function `RawKeyEvent.physicalKey` for more information.
3683 pub const SHIFT_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e5);
3684
3685 /// Represents the location of the "Alt Right" key on a generalized keyboard.
3686 ///
3687 /// See the function `RawKeyEvent.physicalKey` for more information.
3688 pub const ALT_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e6);
3689
3690 /// Represents the location of the "Meta Right" key on a generalized keyboard.
3691 ///
3692 /// See the function `RawKeyEvent.physicalKey` for more information.
3693 pub const META_RIGHT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000700e7);
3694
3695 /// Represents the location of the "Info" key on a generalized keyboard.
3696 ///
3697 /// See the function `RawKeyEvent.physicalKey` for more information.
3698 pub const INFO: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0060);
3699
3700 /// Represents the location of the "Closed Caption Toggle" key on a
3701 /// generalized keyboard.
3702 ///
3703 /// See the function `RawKeyEvent.physicalKey` for more information.
3704 pub const CLOSED_CAPTION_TOGGLE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0061);
3705
3706 /// Represents the location of the "Brightness Up" key on a generalized
3707 /// keyboard.
3708 ///
3709 /// See the function `RawKeyEvent.physicalKey` for more information.
3710 pub const BRIGHTNESS_UP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c006f);
3711
3712 /// Represents the location of the "Brightness Down" key on a generalized
3713 /// keyboard.
3714 ///
3715 /// See the function `RawKeyEvent.physicalKey` for more information.
3716 pub const BRIGHTNESS_DOWN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0070);
3717
3718 /// Represents the location of the "Brightness Toggle" key on a generalized
3719 /// keyboard.
3720 ///
3721 /// See the function `RawKeyEvent.physicalKey` for more information.
3722 pub const BRIGHTNESS_TOGGLE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0072);
3723
3724 /// Represents the location of the "Brightness Minimum" key on a generalized
3725 /// keyboard.
3726 ///
3727 /// See the function `RawKeyEvent.physicalKey` for more information.
3728 pub const BRIGHTNESS_MINIMUM: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0073);
3729
3730 /// Represents the location of the "Brightness Maximum" key on a generalized
3731 /// keyboard.
3732 ///
3733 /// See the function `RawKeyEvent.physicalKey` for more information.
3734 pub const BRIGHTNESS_MAXIMUM: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0074);
3735
3736 /// Represents the location of the "Brightness Auto" key on a generalized
3737 /// keyboard.
3738 ///
3739 /// See the function `RawKeyEvent.physicalKey` for more information.
3740 pub const BRIGHTNESS_AUTO: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0075);
3741
3742 /// Represents the location of the "Kbd Illum Up" key on a generalized
3743 /// keyboard.
3744 ///
3745 /// See the function `RawKeyEvent.physicalKey` for more information.
3746 pub const KBD_ILLUM_UP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0079);
3747
3748 /// Represents the location of the "Kbd Illum Down" key on a generalized
3749 /// keyboard.
3750 ///
3751 /// See the function `RawKeyEvent.physicalKey` for more information.
3752 pub const KBD_ILLUM_DOWN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c007a);
3753
3754 /// Represents the location of the "Media Last" key on a generalized keyboard.
3755 ///
3756 /// See the function `RawKeyEvent.physicalKey` for more information.
3757 pub const MEDIA_LAST: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0083);
3758
3759 /// Represents the location of the "Launch Phone" key on a generalized
3760 /// keyboard.
3761 ///
3762 /// See the function `RawKeyEvent.physicalKey` for more information.
3763 pub const LAUNCH_PHONE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c008c);
3764
3765 /// Represents the location of the "Program Guide" key on a generalized
3766 /// keyboard.
3767 ///
3768 /// See the function `RawKeyEvent.physicalKey` for more information.
3769 pub const PROGRAM_GUIDE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c008d);
3770
3771 /// Represents the location of the "Exit" key on a generalized keyboard.
3772 ///
3773 /// See the function `RawKeyEvent.physicalKey` for more information.
3774 pub const EXIT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0094);
3775
3776 /// Represents the location of the "Channel Up" key on a generalized keyboard.
3777 ///
3778 /// See the function `RawKeyEvent.physicalKey` for more information.
3779 pub const CHANNEL_UP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c009c);
3780
3781 /// Represents the location of the "Channel Down" key on a generalized
3782 /// keyboard.
3783 ///
3784 /// See the function `RawKeyEvent.physicalKey` for more information.
3785 pub const CHANNEL_DOWN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c009d);
3786
3787 /// Represents the location of the "Media Play" key on a generalized keyboard.
3788 ///
3789 /// See the function `RawKeyEvent.physicalKey` for more information.
3790 pub const MEDIA_PLAY: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b0);
3791
3792 /// Represents the location of the "Media Pause" key on a generalized
3793 /// keyboard.
3794 ///
3795 /// See the function `RawKeyEvent.physicalKey` for more information.
3796 pub const MEDIA_PAUSE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b1);
3797
3798 /// Represents the location of the "Media Record" key on a generalized
3799 /// keyboard.
3800 ///
3801 /// See the function `RawKeyEvent.physicalKey` for more information.
3802 pub const MEDIA_RECORD: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b2);
3803
3804 /// Represents the location of the "Media Fast Forward" key on a generalized
3805 /// keyboard.
3806 ///
3807 /// See the function `RawKeyEvent.physicalKey` for more information.
3808 pub const MEDIA_FAST_FORWARD: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b3);
3809
3810 /// Represents the location of the "Media Rewind" key on a generalized
3811 /// keyboard.
3812 ///
3813 /// See the function `RawKeyEvent.physicalKey` for more information.
3814 pub const MEDIA_REWIND: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b4);
3815
3816 /// Represents the location of the "Media Track Next" key on a generalized
3817 /// keyboard.
3818 ///
3819 /// See the function `RawKeyEvent.physicalKey` for more information.
3820 pub const MEDIA_TRACK_NEXT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b5);
3821
3822 /// Represents the location of the "Media Track Previous" key on a generalized
3823 /// keyboard.
3824 ///
3825 /// See the function `RawKeyEvent.physicalKey` for more information.
3826 pub const MEDIA_TRACK_PREVIOUS: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b6);
3827
3828 /// Represents the location of the "Media Stop" key on a generalized keyboard.
3829 ///
3830 /// See the function `RawKeyEvent.physicalKey` for more information.
3831 pub const MEDIA_STOP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b7);
3832
3833 /// Represents the location of the "Eject" key on a generalized keyboard.
3834 ///
3835 /// See the function `RawKeyEvent.physicalKey` for more information.
3836 pub const EJECT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00b8);
3837
3838 /// Represents the location of the "Media Play Pause" key on a generalized
3839 /// keyboard.
3840 ///
3841 /// See the function `RawKeyEvent.physicalKey` for more information.
3842 pub const MEDIA_PLAY_PAUSE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00cd);
3843
3844 /// Represents the location of the "Speech Input Toggle" key on a generalized
3845 /// keyboard.
3846 ///
3847 /// See the function `RawKeyEvent.physicalKey` for more information.
3848 pub const SPEECH_INPUT_TOGGLE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00cf);
3849
3850 /// Represents the location of the "Bass Boost" key on a generalized keyboard.
3851 ///
3852 /// See the function `RawKeyEvent.physicalKey` for more information.
3853 pub const BASS_BOOST: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c00e5);
3854
3855 /// Represents the location of the "Media Select" key on a generalized
3856 /// keyboard.
3857 ///
3858 /// See the function `RawKeyEvent.physicalKey` for more information.
3859 pub const MEDIA_SELECT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0183);
3860
3861 /// Represents the location of the "Launch Word Processor" key on a
3862 /// generalized keyboard.
3863 ///
3864 /// See the function `RawKeyEvent.physicalKey` for more information.
3865 pub const LAUNCH_WORD_PROCESSOR: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0184);
3866
3867 /// Represents the location of the "Launch Spreadsheet" key on a generalized
3868 /// keyboard.
3869 ///
3870 /// See the function `RawKeyEvent.physicalKey` for more information.
3871 pub const LAUNCH_SPREADSHEET: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0186);
3872
3873 /// Represents the location of the "Launch Mail" key on a generalized
3874 /// keyboard.
3875 ///
3876 /// See the function `RawKeyEvent.physicalKey` for more information.
3877 pub const LAUNCH_MAIL: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c018a);
3878
3879 /// Represents the location of the "Launch Contacts" key on a generalized
3880 /// keyboard.
3881 ///
3882 /// See the function `RawKeyEvent.physicalKey` for more information.
3883 pub const LAUNCH_CONTACTS: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c018d);
3884
3885 /// Represents the location of the "Launch Calendar" key on a generalized
3886 /// keyboard.
3887 ///
3888 /// See the function `RawKeyEvent.physicalKey` for more information.
3889 pub const LAUNCH_CALENDAR: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c018e);
3890
3891 /// Represents the location of the "Launch App2" key on a generalized
3892 /// keyboard.
3893 ///
3894 /// See the function `RawKeyEvent.physicalKey` for more information.
3895 pub const LAUNCH_APP2: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0192);
3896
3897 /// Represents the location of the "Launch App1" key on a generalized
3898 /// keyboard.
3899 ///
3900 /// See the function `RawKeyEvent.physicalKey` for more information.
3901 pub const LAUNCH_APP1: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0194);
3902
3903 /// Represents the location of the "Launch Internet Browser" key on a
3904 /// generalized keyboard.
3905 ///
3906 /// See the function `RawKeyEvent.physicalKey` for more information.
3907 pub const LAUNCH_INTERNET_BROWSER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0196);
3908
3909 /// Represents the location of the "Log Off" key on a generalized keyboard.
3910 ///
3911 /// See the function `RawKeyEvent.physicalKey` for more information.
3912 pub const LOG_OFF: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c019c);
3913
3914 /// Represents the location of the "Lock Screen" key on a generalized
3915 /// keyboard.
3916 ///
3917 /// See the function `RawKeyEvent.physicalKey` for more information.
3918 pub const LOCK_SCREEN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c019e);
3919
3920 /// Represents the location of the "Launch Control Panel" key on a generalized
3921 /// keyboard.
3922 ///
3923 /// See the function `RawKeyEvent.physicalKey` for more information.
3924 pub const LAUNCH_CONTROL_PANEL: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c019f);
3925
3926 /// Represents the location of the "Select Task" key on a generalized
3927 /// keyboard.
3928 ///
3929 /// See the function `RawKeyEvent.physicalKey` for more information.
3930 pub const SELECT_TASK: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c01a2);
3931
3932 /// Represents the location of the "Launch Documents" key on a generalized
3933 /// keyboard.
3934 ///
3935 /// See the function `RawKeyEvent.physicalKey` for more information.
3936 pub const LAUNCH_DOCUMENTS: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c01a7);
3937
3938 /// Represents the location of the "Spell Check" key on a generalized
3939 /// keyboard.
3940 ///
3941 /// See the function `RawKeyEvent.physicalKey` for more information.
3942 pub const SPELL_CHECK: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c01ab);
3943
3944 /// Represents the location of the "Launch Keyboard Layout" key on a
3945 /// generalized keyboard.
3946 ///
3947 /// See the function `RawKeyEvent.physicalKey` for more information.
3948 pub const LAUNCH_KEYBOARD_LAYOUT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c01ae);
3949
3950 /// Represents the location of the "Launch Screen Saver" key on a generalized
3951 /// keyboard.
3952 ///
3953 /// See the function `RawKeyEvent.physicalKey` for more information.
3954 pub const LAUNCH_SCREEN_SAVER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c01b1);
3955
3956 /// Represents the location of the "Launch Audio Browser" key on a generalized
3957 /// keyboard.
3958 ///
3959 /// See the function `RawKeyEvent.physicalKey` for more information.
3960 pub const LAUNCH_AUDIO_BROWSER: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c01b7);
3961
3962 /// Represents the location of the "Launch Assistant" key on a generalized
3963 /// keyboard.
3964 ///
3965 /// See the function `RawKeyEvent.physicalKey` for more information.
3966 pub const LAUNCH_ASSISTANT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c01cb);
3967
3968 /// Represents the location of the "New Key" key on a generalized keyboard.
3969 ///
3970 /// See the function `RawKeyEvent.physicalKey` for more information.
3971 pub const NEW_KEY: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0201);
3972
3973 /// Represents the location of the "Close" key on a generalized keyboard.
3974 ///
3975 /// See the function `RawKeyEvent.physicalKey` for more information.
3976 pub const CLOSE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0203);
3977
3978 /// Represents the location of the "Save" key on a generalized keyboard.
3979 ///
3980 /// See the function `RawKeyEvent.physicalKey` for more information.
3981 pub const SAVE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0207);
3982
3983 /// Represents the location of the "Print" key on a generalized keyboard.
3984 ///
3985 /// See the function `RawKeyEvent.physicalKey` for more information.
3986 pub const PRINT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0208);
3987
3988 /// Represents the location of the "Browser Search" key on a generalized
3989 /// keyboard.
3990 ///
3991 /// See the function `RawKeyEvent.physicalKey` for more information.
3992 pub const BROWSER_SEARCH: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0221);
3993
3994 /// Represents the location of the "Browser Home" key on a generalized
3995 /// keyboard.
3996 ///
3997 /// See the function `RawKeyEvent.physicalKey` for more information.
3998 pub const BROWSER_HOME: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0223);
3999
4000 /// Represents the location of the "Browser Back" key on a generalized
4001 /// keyboard.
4002 ///
4003 /// See the function `RawKeyEvent.physicalKey` for more information.
4004 pub const BROWSER_BACK: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0224);
4005
4006 /// Represents the location of the "Browser Forward" key on a generalized
4007 /// keyboard.
4008 ///
4009 /// See the function `RawKeyEvent.physicalKey` for more information.
4010 pub const BROWSER_FORWARD: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0225);
4011
4012 /// Represents the location of the "Browser Stop" key on a generalized
4013 /// keyboard.
4014 ///
4015 /// See the function `RawKeyEvent.physicalKey` for more information.
4016 pub const BROWSER_STOP: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0226);
4017
4018 /// Represents the location of the "Browser Refresh" key on a generalized
4019 /// keyboard.
4020 ///
4021 /// See the function `RawKeyEvent.physicalKey` for more information.
4022 pub const BROWSER_REFRESH: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0227);
4023
4024 /// Represents the location of the "Browser Favorites" key on a generalized
4025 /// keyboard.
4026 ///
4027 /// See the function `RawKeyEvent.physicalKey` for more information.
4028 pub const BROWSER_FAVORITES: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c022a);
4029
4030 /// Represents the location of the "Zoom In" key on a generalized keyboard.
4031 ///
4032 /// See the function `RawKeyEvent.physicalKey` for more information.
4033 pub const ZOOM_IN: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c022d);
4034
4035 /// Represents the location of the "Zoom Out" key on a generalized keyboard.
4036 ///
4037 /// See the function `RawKeyEvent.physicalKey` for more information.
4038 pub const ZOOM_OUT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c022e);
4039
4040 /// Represents the location of the "Zoom Toggle" key on a generalized
4041 /// keyboard.
4042 ///
4043 /// See the function `RawKeyEvent.physicalKey` for more information.
4044 pub const ZOOM_TOGGLE: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0232);
4045
4046 /// Represents the location of the "Redo" key on a generalized keyboard.
4047 ///
4048 /// See the function `RawKeyEvent.physicalKey` for more information.
4049 pub const REDO: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0279);
4050
4051 /// Represents the location of the "Mail Reply" key on a generalized keyboard.
4052 ///
4053 /// See the function `RawKeyEvent.physicalKey` for more information.
4054 pub const MAIL_REPLY: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c0289);
4055
4056 /// Represents the location of the "Mail Forward" key on a generalized
4057 /// keyboard.
4058 ///
4059 /// See the function `RawKeyEvent.physicalKey` for more information.
4060 pub const MAIL_FORWARD: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c028b);
4061
4062 /// Represents the location of the "Mail Send" key on a generalized keyboard.
4063 ///
4064 /// See the function `RawKeyEvent.physicalKey` for more information.
4065 pub const MAIL_SEND: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c028c);
4066
4067 /// Represents the location of the "Keyboard Layout Select" key on a
4068 /// generalized keyboard.
4069 ///
4070 /// See the function `RawKeyEvent.physicalKey` for more information.
4071 pub const KEYBOARD_LAYOUT_SELECT: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c029d);
4072
4073 /// Represents the location of the "Show All Windows" key on a generalized
4074 /// keyboard.
4075 ///
4076 /// See the function `RawKeyEvent.physicalKey` for more information.
4077 pub const SHOW_ALL_WINDOWS: PhysicalKeyboardKey = PhysicalKeyboardKey::new(0x000c029f);
4078
4079 /// All predefined constant [`PhysicalKeyboardKey`]s.
4080 pub fn known_physical_keys() -> impl Iterator<Item = PhysicalKeyboardKey> {
4081 KNOWN_PHYSICAL_KEYS.iter().copied()
4082 }
4083}
4084
4085impl Debug for PhysicalKeyboardKey {
4086 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4087 write!(
4088 f,
4089 "PhysicalKeyboardKey(usbHidUsage: 0x{:08x}",
4090 self.usb_hid_usage
4091 )?;
4092 if let Some(debug_name) = self.debug_name() {
4093 write!(f, ", debugName: {debug_name}")?;
4094 }
4095 f.write_str(")")
4096 }
4097}
4098
4099/// Dart's `LogicalKeyboardKey._keyLabels`, sorted by key ID.
4100fn key_label_of(key_id: u64) -> Option<&'static str> {
4101 KEY_LABELS
4102 .binary_search_by_key(&key_id, |&(id, _)| id)
4103 .ok()
4104 .map(|index| KEY_LABELS[index].1)
4105}
4106
4107/// Dart's `PhysicalKeyboardKey._debugNames`, sorted by USB HID usage.
4108fn debug_name_of(usb_hid_usage: u64) -> Option<&'static str> {
4109 DEBUG_NAMES
4110 .binary_search_by_key(&usb_hid_usage, |&(usage, _)| usage)
4111 .ok()
4112 .map(|index| DEBUG_NAMES[index].1)
4113}
4114
4115/// Dart's `LogicalKeyboardKey._synonyms`: a key to the pseudo-key synonym for it.
4116fn synonyms_of(key: LogicalKeyboardKey) -> Option<&'static [LogicalKeyboardKey]> {
4117 SYNONYMS
4118 .iter()
4119 .find(|&&(candidate, _)| candidate == key)
4120 .map(|&(_, keys)| keys)
4121}
4122
4123/// Dart's `LogicalKeyboardKey._reverseSynonyms`: a pseudo-key to the keys it stands for.
4124fn reverse_synonyms_of(key: LogicalKeyboardKey) -> Option<&'static [LogicalKeyboardKey]> {
4125 REVERSE_SYNONYMS
4126 .iter()
4127 .find(|&&(candidate, _)| candidate == key)
4128 .map(|&(_, keys)| keys)
4129}
4130
4131/// All the predefined constant [`LogicalKeyboardKey`]s, sorted by key ID so they
4132/// can be searched.
4133static KNOWN_LOGICAL_KEYS: &[LogicalKeyboardKey] = &[
4134 LogicalKeyboardKey::SPACE,
4135 LogicalKeyboardKey::EXCLAMATION,
4136 LogicalKeyboardKey::QUOTE,
4137 LogicalKeyboardKey::NUMBER_SIGN,
4138 LogicalKeyboardKey::DOLLAR,
4139 LogicalKeyboardKey::PERCENT,
4140 LogicalKeyboardKey::AMPERSAND,
4141 LogicalKeyboardKey::QUOTE_SINGLE,
4142 LogicalKeyboardKey::PARENTHESIS_LEFT,
4143 LogicalKeyboardKey::PARENTHESIS_RIGHT,
4144 LogicalKeyboardKey::ASTERISK,
4145 LogicalKeyboardKey::ADD,
4146 LogicalKeyboardKey::COMMA,
4147 LogicalKeyboardKey::MINUS,
4148 LogicalKeyboardKey::PERIOD,
4149 LogicalKeyboardKey::SLASH,
4150 LogicalKeyboardKey::DIGIT0,
4151 LogicalKeyboardKey::DIGIT1,
4152 LogicalKeyboardKey::DIGIT2,
4153 LogicalKeyboardKey::DIGIT3,
4154 LogicalKeyboardKey::DIGIT4,
4155 LogicalKeyboardKey::DIGIT5,
4156 LogicalKeyboardKey::DIGIT6,
4157 LogicalKeyboardKey::DIGIT7,
4158 LogicalKeyboardKey::DIGIT8,
4159 LogicalKeyboardKey::DIGIT9,
4160 LogicalKeyboardKey::COLON,
4161 LogicalKeyboardKey::SEMICOLON,
4162 LogicalKeyboardKey::LESS,
4163 LogicalKeyboardKey::EQUAL,
4164 LogicalKeyboardKey::GREATER,
4165 LogicalKeyboardKey::QUESTION,
4166 LogicalKeyboardKey::AT,
4167 LogicalKeyboardKey::BRACKET_LEFT,
4168 LogicalKeyboardKey::BACKSLASH,
4169 LogicalKeyboardKey::BRACKET_RIGHT,
4170 LogicalKeyboardKey::CARET,
4171 LogicalKeyboardKey::UNDERSCORE,
4172 LogicalKeyboardKey::BACKQUOTE,
4173 LogicalKeyboardKey::KEY_A,
4174 LogicalKeyboardKey::KEY_B,
4175 LogicalKeyboardKey::KEY_C,
4176 LogicalKeyboardKey::KEY_D,
4177 LogicalKeyboardKey::KEY_E,
4178 LogicalKeyboardKey::KEY_F,
4179 LogicalKeyboardKey::KEY_G,
4180 LogicalKeyboardKey::KEY_H,
4181 LogicalKeyboardKey::KEY_I,
4182 LogicalKeyboardKey::KEY_J,
4183 LogicalKeyboardKey::KEY_K,
4184 LogicalKeyboardKey::KEY_L,
4185 LogicalKeyboardKey::KEY_M,
4186 LogicalKeyboardKey::KEY_N,
4187 LogicalKeyboardKey::KEY_O,
4188 LogicalKeyboardKey::KEY_P,
4189 LogicalKeyboardKey::KEY_Q,
4190 LogicalKeyboardKey::KEY_R,
4191 LogicalKeyboardKey::KEY_S,
4192 LogicalKeyboardKey::KEY_T,
4193 LogicalKeyboardKey::KEY_U,
4194 LogicalKeyboardKey::KEY_V,
4195 LogicalKeyboardKey::KEY_W,
4196 LogicalKeyboardKey::KEY_X,
4197 LogicalKeyboardKey::KEY_Y,
4198 LogicalKeyboardKey::KEY_Z,
4199 LogicalKeyboardKey::BRACE_LEFT,
4200 LogicalKeyboardKey::BAR,
4201 LogicalKeyboardKey::BRACE_RIGHT,
4202 LogicalKeyboardKey::TILDE,
4203 LogicalKeyboardKey::UNIDENTIFIED,
4204 LogicalKeyboardKey::BACKSPACE,
4205 LogicalKeyboardKey::TAB,
4206 LogicalKeyboardKey::ENTER,
4207 LogicalKeyboardKey::ESCAPE,
4208 LogicalKeyboardKey::DELETE,
4209 LogicalKeyboardKey::ACCEL,
4210 LogicalKeyboardKey::ALT_GRAPH,
4211 LogicalKeyboardKey::CAPS_LOCK,
4212 LogicalKeyboardKey::FN,
4213 LogicalKeyboardKey::FN_LOCK,
4214 LogicalKeyboardKey::HYPER,
4215 LogicalKeyboardKey::NUM_LOCK,
4216 LogicalKeyboardKey::SCROLL_LOCK,
4217 LogicalKeyboardKey::SUPER_KEY,
4218 LogicalKeyboardKey::SYMBOL,
4219 LogicalKeyboardKey::SYMBOL_LOCK,
4220 LogicalKeyboardKey::SHIFT_LEVEL5,
4221 LogicalKeyboardKey::ARROW_DOWN,
4222 LogicalKeyboardKey::ARROW_LEFT,
4223 LogicalKeyboardKey::ARROW_RIGHT,
4224 LogicalKeyboardKey::ARROW_UP,
4225 LogicalKeyboardKey::END,
4226 LogicalKeyboardKey::HOME,
4227 LogicalKeyboardKey::PAGE_DOWN,
4228 LogicalKeyboardKey::PAGE_UP,
4229 LogicalKeyboardKey::CLEAR,
4230 LogicalKeyboardKey::COPY,
4231 LogicalKeyboardKey::CR_SEL,
4232 LogicalKeyboardKey::CUT,
4233 LogicalKeyboardKey::ERASE_EOF,
4234 LogicalKeyboardKey::EX_SEL,
4235 LogicalKeyboardKey::INSERT,
4236 LogicalKeyboardKey::PASTE,
4237 LogicalKeyboardKey::REDO,
4238 LogicalKeyboardKey::UNDO,
4239 LogicalKeyboardKey::ACCEPT,
4240 LogicalKeyboardKey::AGAIN,
4241 LogicalKeyboardKey::ATTN,
4242 LogicalKeyboardKey::CANCEL,
4243 LogicalKeyboardKey::CONTEXT_MENU,
4244 LogicalKeyboardKey::EXECUTE,
4245 LogicalKeyboardKey::FIND,
4246 LogicalKeyboardKey::HELP,
4247 LogicalKeyboardKey::PAUSE,
4248 LogicalKeyboardKey::PLAY,
4249 LogicalKeyboardKey::PROPS,
4250 LogicalKeyboardKey::SELECT,
4251 LogicalKeyboardKey::ZOOM_IN,
4252 LogicalKeyboardKey::ZOOM_OUT,
4253 LogicalKeyboardKey::BRIGHTNESS_DOWN,
4254 LogicalKeyboardKey::BRIGHTNESS_UP,
4255 LogicalKeyboardKey::CAMERA,
4256 LogicalKeyboardKey::EJECT,
4257 LogicalKeyboardKey::LOG_OFF,
4258 LogicalKeyboardKey::POWER,
4259 LogicalKeyboardKey::POWER_OFF,
4260 LogicalKeyboardKey::PRINT_SCREEN,
4261 LogicalKeyboardKey::HIBERNATE,
4262 LogicalKeyboardKey::STANDBY,
4263 LogicalKeyboardKey::WAKE_UP,
4264 LogicalKeyboardKey::ALL_CANDIDATES,
4265 LogicalKeyboardKey::ALPHANUMERIC,
4266 LogicalKeyboardKey::CODE_INPUT,
4267 LogicalKeyboardKey::COMPOSE,
4268 LogicalKeyboardKey::CONVERT,
4269 LogicalKeyboardKey::FINAL_MODE,
4270 LogicalKeyboardKey::GROUP_FIRST,
4271 LogicalKeyboardKey::GROUP_LAST,
4272 LogicalKeyboardKey::GROUP_NEXT,
4273 LogicalKeyboardKey::GROUP_PREVIOUS,
4274 LogicalKeyboardKey::MODE_CHANGE,
4275 LogicalKeyboardKey::NEXT_CANDIDATE,
4276 LogicalKeyboardKey::NON_CONVERT,
4277 LogicalKeyboardKey::PREVIOUS_CANDIDATE,
4278 LogicalKeyboardKey::PROCESS,
4279 LogicalKeyboardKey::SINGLE_CANDIDATE,
4280 LogicalKeyboardKey::HANGUL_MODE,
4281 LogicalKeyboardKey::HANJA_MODE,
4282 LogicalKeyboardKey::JUNJA_MODE,
4283 LogicalKeyboardKey::EISU,
4284 LogicalKeyboardKey::HANKAKU,
4285 LogicalKeyboardKey::HIRAGANA,
4286 LogicalKeyboardKey::HIRAGANA_KATAKANA,
4287 LogicalKeyboardKey::KANA_MODE,
4288 LogicalKeyboardKey::KANJI_MODE,
4289 LogicalKeyboardKey::KATAKANA,
4290 LogicalKeyboardKey::ROMAJI,
4291 LogicalKeyboardKey::ZENKAKU,
4292 LogicalKeyboardKey::ZENKAKU_HANKAKU,
4293 LogicalKeyboardKey::F1,
4294 LogicalKeyboardKey::F2,
4295 LogicalKeyboardKey::F3,
4296 LogicalKeyboardKey::F4,
4297 LogicalKeyboardKey::F5,
4298 LogicalKeyboardKey::F6,
4299 LogicalKeyboardKey::F7,
4300 LogicalKeyboardKey::F8,
4301 LogicalKeyboardKey::F9,
4302 LogicalKeyboardKey::F10,
4303 LogicalKeyboardKey::F11,
4304 LogicalKeyboardKey::F12,
4305 LogicalKeyboardKey::F13,
4306 LogicalKeyboardKey::F14,
4307 LogicalKeyboardKey::F15,
4308 LogicalKeyboardKey::F16,
4309 LogicalKeyboardKey::F17,
4310 LogicalKeyboardKey::F18,
4311 LogicalKeyboardKey::F19,
4312 LogicalKeyboardKey::F20,
4313 LogicalKeyboardKey::F21,
4314 LogicalKeyboardKey::F22,
4315 LogicalKeyboardKey::F23,
4316 LogicalKeyboardKey::F24,
4317 LogicalKeyboardKey::SOFT1,
4318 LogicalKeyboardKey::SOFT2,
4319 LogicalKeyboardKey::SOFT3,
4320 LogicalKeyboardKey::SOFT4,
4321 LogicalKeyboardKey::SOFT5,
4322 LogicalKeyboardKey::SOFT6,
4323 LogicalKeyboardKey::SOFT7,
4324 LogicalKeyboardKey::SOFT8,
4325 LogicalKeyboardKey::CLOSE,
4326 LogicalKeyboardKey::MAIL_FORWARD,
4327 LogicalKeyboardKey::MAIL_REPLY,
4328 LogicalKeyboardKey::MAIL_SEND,
4329 LogicalKeyboardKey::MEDIA_PLAY_PAUSE,
4330 LogicalKeyboardKey::MEDIA_STOP,
4331 LogicalKeyboardKey::MEDIA_TRACK_NEXT,
4332 LogicalKeyboardKey::MEDIA_TRACK_PREVIOUS,
4333 LogicalKeyboardKey::NEW_KEY,
4334 LogicalKeyboardKey::OPEN,
4335 LogicalKeyboardKey::PRINT,
4336 LogicalKeyboardKey::SAVE,
4337 LogicalKeyboardKey::SPELL_CHECK,
4338 LogicalKeyboardKey::AUDIO_VOLUME_DOWN,
4339 LogicalKeyboardKey::AUDIO_VOLUME_UP,
4340 LogicalKeyboardKey::AUDIO_VOLUME_MUTE,
4341 LogicalKeyboardKey::LAUNCH_APPLICATION2,
4342 LogicalKeyboardKey::LAUNCH_CALENDAR,
4343 LogicalKeyboardKey::LAUNCH_MAIL,
4344 LogicalKeyboardKey::LAUNCH_MEDIA_PLAYER,
4345 LogicalKeyboardKey::LAUNCH_MUSIC_PLAYER,
4346 LogicalKeyboardKey::LAUNCH_APPLICATION1,
4347 LogicalKeyboardKey::LAUNCH_SCREEN_SAVER,
4348 LogicalKeyboardKey::LAUNCH_SPREADSHEET,
4349 LogicalKeyboardKey::LAUNCH_WEB_BROWSER,
4350 LogicalKeyboardKey::LAUNCH_WEB_CAM,
4351 LogicalKeyboardKey::LAUNCH_WORD_PROCESSOR,
4352 LogicalKeyboardKey::LAUNCH_CONTACTS,
4353 LogicalKeyboardKey::LAUNCH_PHONE,
4354 LogicalKeyboardKey::LAUNCH_ASSISTANT,
4355 LogicalKeyboardKey::LAUNCH_CONTROL_PANEL,
4356 LogicalKeyboardKey::BROWSER_BACK,
4357 LogicalKeyboardKey::BROWSER_FAVORITES,
4358 LogicalKeyboardKey::BROWSER_FORWARD,
4359 LogicalKeyboardKey::BROWSER_HOME,
4360 LogicalKeyboardKey::BROWSER_REFRESH,
4361 LogicalKeyboardKey::BROWSER_SEARCH,
4362 LogicalKeyboardKey::BROWSER_STOP,
4363 LogicalKeyboardKey::AUDIO_BALANCE_LEFT,
4364 LogicalKeyboardKey::AUDIO_BALANCE_RIGHT,
4365 LogicalKeyboardKey::AUDIO_BASS_BOOST_DOWN,
4366 LogicalKeyboardKey::AUDIO_BASS_BOOST_UP,
4367 LogicalKeyboardKey::AUDIO_FADER_FRONT,
4368 LogicalKeyboardKey::AUDIO_FADER_REAR,
4369 LogicalKeyboardKey::AUDIO_SURROUND_MODE_NEXT,
4370 LogicalKeyboardKey::AVR_INPUT,
4371 LogicalKeyboardKey::AVR_POWER,
4372 LogicalKeyboardKey::CHANNEL_DOWN,
4373 LogicalKeyboardKey::CHANNEL_UP,
4374 LogicalKeyboardKey::COLOR_F0_RED,
4375 LogicalKeyboardKey::COLOR_F1_GREEN,
4376 LogicalKeyboardKey::COLOR_F2_YELLOW,
4377 LogicalKeyboardKey::COLOR_F3_BLUE,
4378 LogicalKeyboardKey::COLOR_F4_GREY,
4379 LogicalKeyboardKey::COLOR_F5_BROWN,
4380 LogicalKeyboardKey::CLOSED_CAPTION_TOGGLE,
4381 LogicalKeyboardKey::DIMMER,
4382 LogicalKeyboardKey::DISPLAY_SWAP,
4383 LogicalKeyboardKey::EXIT,
4384 LogicalKeyboardKey::FAVORITE_CLEAR0,
4385 LogicalKeyboardKey::FAVORITE_CLEAR1,
4386 LogicalKeyboardKey::FAVORITE_CLEAR2,
4387 LogicalKeyboardKey::FAVORITE_CLEAR3,
4388 LogicalKeyboardKey::FAVORITE_RECALL0,
4389 LogicalKeyboardKey::FAVORITE_RECALL1,
4390 LogicalKeyboardKey::FAVORITE_RECALL2,
4391 LogicalKeyboardKey::FAVORITE_RECALL3,
4392 LogicalKeyboardKey::FAVORITE_STORE0,
4393 LogicalKeyboardKey::FAVORITE_STORE1,
4394 LogicalKeyboardKey::FAVORITE_STORE2,
4395 LogicalKeyboardKey::FAVORITE_STORE3,
4396 LogicalKeyboardKey::GUIDE,
4397 LogicalKeyboardKey::GUIDE_NEXT_DAY,
4398 LogicalKeyboardKey::GUIDE_PREVIOUS_DAY,
4399 LogicalKeyboardKey::INFO,
4400 LogicalKeyboardKey::INSTANT_REPLAY,
4401 LogicalKeyboardKey::LINK,
4402 LogicalKeyboardKey::LIST_PROGRAM,
4403 LogicalKeyboardKey::LIVE_CONTENT,
4404 LogicalKeyboardKey::LOCK,
4405 LogicalKeyboardKey::MEDIA_APPS,
4406 LogicalKeyboardKey::MEDIA_FAST_FORWARD,
4407 LogicalKeyboardKey::MEDIA_LAST,
4408 LogicalKeyboardKey::MEDIA_PAUSE,
4409 LogicalKeyboardKey::MEDIA_PLAY,
4410 LogicalKeyboardKey::MEDIA_RECORD,
4411 LogicalKeyboardKey::MEDIA_REWIND,
4412 LogicalKeyboardKey::MEDIA_SKIP,
4413 LogicalKeyboardKey::NEXT_FAVORITE_CHANNEL,
4414 LogicalKeyboardKey::NEXT_USER_PROFILE,
4415 LogicalKeyboardKey::ON_DEMAND,
4416 LogicalKeyboardKey::P_IN_P_DOWN,
4417 LogicalKeyboardKey::P_IN_P_MOVE,
4418 LogicalKeyboardKey::P_IN_P_TOGGLE,
4419 LogicalKeyboardKey::P_IN_P_UP,
4420 LogicalKeyboardKey::PLAY_SPEED_DOWN,
4421 LogicalKeyboardKey::PLAY_SPEED_RESET,
4422 LogicalKeyboardKey::PLAY_SPEED_UP,
4423 LogicalKeyboardKey::RANDOM_TOGGLE,
4424 LogicalKeyboardKey::RC_LOW_BATTERY,
4425 LogicalKeyboardKey::RECORD_SPEED_NEXT,
4426 LogicalKeyboardKey::RF_BYPASS,
4427 LogicalKeyboardKey::SCAN_CHANNELS_TOGGLE,
4428 LogicalKeyboardKey::SCREEN_MODE_NEXT,
4429 LogicalKeyboardKey::SETTINGS,
4430 LogicalKeyboardKey::SPLIT_SCREEN_TOGGLE,
4431 LogicalKeyboardKey::STB_INPUT,
4432 LogicalKeyboardKey::STB_POWER,
4433 LogicalKeyboardKey::SUBTITLE,
4434 LogicalKeyboardKey::TELETEXT,
4435 LogicalKeyboardKey::TV,
4436 LogicalKeyboardKey::TV_INPUT,
4437 LogicalKeyboardKey::TV_POWER,
4438 LogicalKeyboardKey::VIDEO_MODE_NEXT,
4439 LogicalKeyboardKey::WINK,
4440 LogicalKeyboardKey::ZOOM_TOGGLE,
4441 LogicalKeyboardKey::DVR,
4442 LogicalKeyboardKey::MEDIA_AUDIO_TRACK,
4443 LogicalKeyboardKey::MEDIA_SKIP_BACKWARD,
4444 LogicalKeyboardKey::MEDIA_SKIP_FORWARD,
4445 LogicalKeyboardKey::MEDIA_STEP_BACKWARD,
4446 LogicalKeyboardKey::MEDIA_STEP_FORWARD,
4447 LogicalKeyboardKey::MEDIA_TOP_MENU,
4448 LogicalKeyboardKey::NAVIGATE_IN,
4449 LogicalKeyboardKey::NAVIGATE_NEXT,
4450 LogicalKeyboardKey::NAVIGATE_OUT,
4451 LogicalKeyboardKey::NAVIGATE_PREVIOUS,
4452 LogicalKeyboardKey::PAIRING,
4453 LogicalKeyboardKey::MEDIA_CLOSE,
4454 LogicalKeyboardKey::AUDIO_BASS_BOOST_TOGGLE,
4455 LogicalKeyboardKey::AUDIO_TREBLE_DOWN,
4456 LogicalKeyboardKey::AUDIO_TREBLE_UP,
4457 LogicalKeyboardKey::MICROPHONE_TOGGLE,
4458 LogicalKeyboardKey::MICROPHONE_VOLUME_DOWN,
4459 LogicalKeyboardKey::MICROPHONE_VOLUME_UP,
4460 LogicalKeyboardKey::MICROPHONE_VOLUME_MUTE,
4461 LogicalKeyboardKey::SPEECH_CORRECTION_LIST,
4462 LogicalKeyboardKey::SPEECH_INPUT_TOGGLE,
4463 LogicalKeyboardKey::APP_SWITCH,
4464 LogicalKeyboardKey::CALL,
4465 LogicalKeyboardKey::CAMERA_FOCUS,
4466 LogicalKeyboardKey::END_CALL,
4467 LogicalKeyboardKey::GO_BACK,
4468 LogicalKeyboardKey::GO_HOME,
4469 LogicalKeyboardKey::HEADSET_HOOK,
4470 LogicalKeyboardKey::LAST_NUMBER_REDIAL,
4471 LogicalKeyboardKey::NOTIFICATION,
4472 LogicalKeyboardKey::MANNER_MODE,
4473 LogicalKeyboardKey::VOICE_DIAL,
4474 LogicalKeyboardKey::TV3_D_MODE,
4475 LogicalKeyboardKey::TV_ANTENNA_CABLE,
4476 LogicalKeyboardKey::TV_AUDIO_DESCRIPTION,
4477 LogicalKeyboardKey::TV_AUDIO_DESCRIPTION_MIX_DOWN,
4478 LogicalKeyboardKey::TV_AUDIO_DESCRIPTION_MIX_UP,
4479 LogicalKeyboardKey::TV_CONTENTS_MENU,
4480 LogicalKeyboardKey::TV_DATA_SERVICE,
4481 LogicalKeyboardKey::TV_INPUT_COMPONENT1,
4482 LogicalKeyboardKey::TV_INPUT_COMPONENT2,
4483 LogicalKeyboardKey::TV_INPUT_COMPOSITE1,
4484 LogicalKeyboardKey::TV_INPUT_COMPOSITE2,
4485 LogicalKeyboardKey::TV_INPUT_HDMI1,
4486 LogicalKeyboardKey::TV_INPUT_HDMI2,
4487 LogicalKeyboardKey::TV_INPUT_HDMI3,
4488 LogicalKeyboardKey::TV_INPUT_HDMI4,
4489 LogicalKeyboardKey::TV_INPUT_VGA1,
4490 LogicalKeyboardKey::TV_MEDIA_CONTEXT,
4491 LogicalKeyboardKey::TV_NETWORK,
4492 LogicalKeyboardKey::TV_NUMBER_ENTRY,
4493 LogicalKeyboardKey::TV_RADIO_SERVICE,
4494 LogicalKeyboardKey::TV_SATELLITE,
4495 LogicalKeyboardKey::TV_SATELLITE_BS,
4496 LogicalKeyboardKey::TV_SATELLITE_CS,
4497 LogicalKeyboardKey::TV_SATELLITE_TOGGLE,
4498 LogicalKeyboardKey::TV_TERRESTRIAL_ANALOG,
4499 LogicalKeyboardKey::TV_TERRESTRIAL_DIGITAL,
4500 LogicalKeyboardKey::TV_TIMER,
4501 LogicalKeyboardKey::KEY11,
4502 LogicalKeyboardKey::KEY12,
4503 LogicalKeyboardKey::SUSPEND,
4504 LogicalKeyboardKey::RESUME,
4505 LogicalKeyboardKey::SLEEP,
4506 LogicalKeyboardKey::ABORT,
4507 LogicalKeyboardKey::LANG1,
4508 LogicalKeyboardKey::LANG2,
4509 LogicalKeyboardKey::LANG3,
4510 LogicalKeyboardKey::LANG4,
4511 LogicalKeyboardKey::LANG5,
4512 LogicalKeyboardKey::INTL_BACKSLASH,
4513 LogicalKeyboardKey::INTL_RO,
4514 LogicalKeyboardKey::INTL_YEN,
4515 LogicalKeyboardKey::CONTROL_LEFT,
4516 LogicalKeyboardKey::CONTROL_RIGHT,
4517 LogicalKeyboardKey::SHIFT_LEFT,
4518 LogicalKeyboardKey::SHIFT_RIGHT,
4519 LogicalKeyboardKey::ALT_LEFT,
4520 LogicalKeyboardKey::ALT_RIGHT,
4521 LogicalKeyboardKey::META_LEFT,
4522 LogicalKeyboardKey::META_RIGHT,
4523 LogicalKeyboardKey::CONTROL,
4524 LogicalKeyboardKey::SHIFT,
4525 LogicalKeyboardKey::ALT,
4526 LogicalKeyboardKey::META,
4527 LogicalKeyboardKey::NUMPAD_ENTER,
4528 LogicalKeyboardKey::NUMPAD_PAREN_LEFT,
4529 LogicalKeyboardKey::NUMPAD_PAREN_RIGHT,
4530 LogicalKeyboardKey::NUMPAD_MULTIPLY,
4531 LogicalKeyboardKey::NUMPAD_ADD,
4532 LogicalKeyboardKey::NUMPAD_COMMA,
4533 LogicalKeyboardKey::NUMPAD_SUBTRACT,
4534 LogicalKeyboardKey::NUMPAD_DECIMAL,
4535 LogicalKeyboardKey::NUMPAD_DIVIDE,
4536 LogicalKeyboardKey::NUMPAD0,
4537 LogicalKeyboardKey::NUMPAD1,
4538 LogicalKeyboardKey::NUMPAD2,
4539 LogicalKeyboardKey::NUMPAD3,
4540 LogicalKeyboardKey::NUMPAD4,
4541 LogicalKeyboardKey::NUMPAD5,
4542 LogicalKeyboardKey::NUMPAD6,
4543 LogicalKeyboardKey::NUMPAD7,
4544 LogicalKeyboardKey::NUMPAD8,
4545 LogicalKeyboardKey::NUMPAD9,
4546 LogicalKeyboardKey::NUMPAD_EQUAL,
4547 LogicalKeyboardKey::GAME_BUTTON1,
4548 LogicalKeyboardKey::GAME_BUTTON2,
4549 LogicalKeyboardKey::GAME_BUTTON3,
4550 LogicalKeyboardKey::GAME_BUTTON4,
4551 LogicalKeyboardKey::GAME_BUTTON5,
4552 LogicalKeyboardKey::GAME_BUTTON6,
4553 LogicalKeyboardKey::GAME_BUTTON7,
4554 LogicalKeyboardKey::GAME_BUTTON8,
4555 LogicalKeyboardKey::GAME_BUTTON9,
4556 LogicalKeyboardKey::GAME_BUTTON10,
4557 LogicalKeyboardKey::GAME_BUTTON11,
4558 LogicalKeyboardKey::GAME_BUTTON12,
4559 LogicalKeyboardKey::GAME_BUTTON13,
4560 LogicalKeyboardKey::GAME_BUTTON14,
4561 LogicalKeyboardKey::GAME_BUTTON15,
4562 LogicalKeyboardKey::GAME_BUTTON16,
4563 LogicalKeyboardKey::GAME_BUTTON_A,
4564 LogicalKeyboardKey::GAME_BUTTON_B,
4565 LogicalKeyboardKey::GAME_BUTTON_C,
4566 LogicalKeyboardKey::GAME_BUTTON_LEFT1,
4567 LogicalKeyboardKey::GAME_BUTTON_LEFT2,
4568 LogicalKeyboardKey::GAME_BUTTON_MODE,
4569 LogicalKeyboardKey::GAME_BUTTON_RIGHT1,
4570 LogicalKeyboardKey::GAME_BUTTON_RIGHT2,
4571 LogicalKeyboardKey::GAME_BUTTON_SELECT,
4572 LogicalKeyboardKey::GAME_BUTTON_START,
4573 LogicalKeyboardKey::GAME_BUTTON_THUMB_LEFT,
4574 LogicalKeyboardKey::GAME_BUTTON_THUMB_RIGHT,
4575 LogicalKeyboardKey::GAME_BUTTON_X,
4576 LogicalKeyboardKey::GAME_BUTTON_Y,
4577 LogicalKeyboardKey::GAME_BUTTON_Z,
4578];
4579
4580/// All the predefined constant [`PhysicalKeyboardKey`]s, sorted by USB HID usage
4581/// so they can be searched.
4582static KNOWN_PHYSICAL_KEYS: &[PhysicalKeyboardKey] = &[
4583 PhysicalKeyboardKey::HYPER,
4584 PhysicalKeyboardKey::SUPER_KEY,
4585 PhysicalKeyboardKey::FN,
4586 PhysicalKeyboardKey::FN_LOCK,
4587 PhysicalKeyboardKey::SUSPEND,
4588 PhysicalKeyboardKey::RESUME,
4589 PhysicalKeyboardKey::TURBO,
4590 PhysicalKeyboardKey::PRIVACY_SCREEN_TOGGLE,
4591 PhysicalKeyboardKey::MICROPHONE_MUTE_TOGGLE,
4592 PhysicalKeyboardKey::SLEEP,
4593 PhysicalKeyboardKey::WAKE_UP,
4594 PhysicalKeyboardKey::DISPLAY_TOGGLE_INT_EXT,
4595 PhysicalKeyboardKey::GAME_BUTTON1,
4596 PhysicalKeyboardKey::GAME_BUTTON2,
4597 PhysicalKeyboardKey::GAME_BUTTON3,
4598 PhysicalKeyboardKey::GAME_BUTTON4,
4599 PhysicalKeyboardKey::GAME_BUTTON5,
4600 PhysicalKeyboardKey::GAME_BUTTON6,
4601 PhysicalKeyboardKey::GAME_BUTTON7,
4602 PhysicalKeyboardKey::GAME_BUTTON8,
4603 PhysicalKeyboardKey::GAME_BUTTON9,
4604 PhysicalKeyboardKey::GAME_BUTTON10,
4605 PhysicalKeyboardKey::GAME_BUTTON11,
4606 PhysicalKeyboardKey::GAME_BUTTON12,
4607 PhysicalKeyboardKey::GAME_BUTTON13,
4608 PhysicalKeyboardKey::GAME_BUTTON14,
4609 PhysicalKeyboardKey::GAME_BUTTON15,
4610 PhysicalKeyboardKey::GAME_BUTTON16,
4611 PhysicalKeyboardKey::GAME_BUTTON_A,
4612 PhysicalKeyboardKey::GAME_BUTTON_B,
4613 PhysicalKeyboardKey::GAME_BUTTON_C,
4614 PhysicalKeyboardKey::GAME_BUTTON_LEFT1,
4615 PhysicalKeyboardKey::GAME_BUTTON_LEFT2,
4616 PhysicalKeyboardKey::GAME_BUTTON_MODE,
4617 PhysicalKeyboardKey::GAME_BUTTON_RIGHT1,
4618 PhysicalKeyboardKey::GAME_BUTTON_RIGHT2,
4619 PhysicalKeyboardKey::GAME_BUTTON_SELECT,
4620 PhysicalKeyboardKey::GAME_BUTTON_START,
4621 PhysicalKeyboardKey::GAME_BUTTON_THUMB_LEFT,
4622 PhysicalKeyboardKey::GAME_BUTTON_THUMB_RIGHT,
4623 PhysicalKeyboardKey::GAME_BUTTON_X,
4624 PhysicalKeyboardKey::GAME_BUTTON_Y,
4625 PhysicalKeyboardKey::GAME_BUTTON_Z,
4626 PhysicalKeyboardKey::USB_RESERVED,
4627 PhysicalKeyboardKey::USB_ERROR_ROLL_OVER,
4628 PhysicalKeyboardKey::USB_POST_FAIL,
4629 PhysicalKeyboardKey::USB_ERROR_UNDEFINED,
4630 PhysicalKeyboardKey::KEY_A,
4631 PhysicalKeyboardKey::KEY_B,
4632 PhysicalKeyboardKey::KEY_C,
4633 PhysicalKeyboardKey::KEY_D,
4634 PhysicalKeyboardKey::KEY_E,
4635 PhysicalKeyboardKey::KEY_F,
4636 PhysicalKeyboardKey::KEY_G,
4637 PhysicalKeyboardKey::KEY_H,
4638 PhysicalKeyboardKey::KEY_I,
4639 PhysicalKeyboardKey::KEY_J,
4640 PhysicalKeyboardKey::KEY_K,
4641 PhysicalKeyboardKey::KEY_L,
4642 PhysicalKeyboardKey::KEY_M,
4643 PhysicalKeyboardKey::KEY_N,
4644 PhysicalKeyboardKey::KEY_O,
4645 PhysicalKeyboardKey::KEY_P,
4646 PhysicalKeyboardKey::KEY_Q,
4647 PhysicalKeyboardKey::KEY_R,
4648 PhysicalKeyboardKey::KEY_S,
4649 PhysicalKeyboardKey::KEY_T,
4650 PhysicalKeyboardKey::KEY_U,
4651 PhysicalKeyboardKey::KEY_V,
4652 PhysicalKeyboardKey::KEY_W,
4653 PhysicalKeyboardKey::KEY_X,
4654 PhysicalKeyboardKey::KEY_Y,
4655 PhysicalKeyboardKey::KEY_Z,
4656 PhysicalKeyboardKey::DIGIT1,
4657 PhysicalKeyboardKey::DIGIT2,
4658 PhysicalKeyboardKey::DIGIT3,
4659 PhysicalKeyboardKey::DIGIT4,
4660 PhysicalKeyboardKey::DIGIT5,
4661 PhysicalKeyboardKey::DIGIT6,
4662 PhysicalKeyboardKey::DIGIT7,
4663 PhysicalKeyboardKey::DIGIT8,
4664 PhysicalKeyboardKey::DIGIT9,
4665 PhysicalKeyboardKey::DIGIT0,
4666 PhysicalKeyboardKey::ENTER,
4667 PhysicalKeyboardKey::ESCAPE,
4668 PhysicalKeyboardKey::BACKSPACE,
4669 PhysicalKeyboardKey::TAB,
4670 PhysicalKeyboardKey::SPACE,
4671 PhysicalKeyboardKey::MINUS,
4672 PhysicalKeyboardKey::EQUAL,
4673 PhysicalKeyboardKey::BRACKET_LEFT,
4674 PhysicalKeyboardKey::BRACKET_RIGHT,
4675 PhysicalKeyboardKey::BACKSLASH,
4676 PhysicalKeyboardKey::SEMICOLON,
4677 PhysicalKeyboardKey::QUOTE,
4678 PhysicalKeyboardKey::BACKQUOTE,
4679 PhysicalKeyboardKey::COMMA,
4680 PhysicalKeyboardKey::PERIOD,
4681 PhysicalKeyboardKey::SLASH,
4682 PhysicalKeyboardKey::CAPS_LOCK,
4683 PhysicalKeyboardKey::F1,
4684 PhysicalKeyboardKey::F2,
4685 PhysicalKeyboardKey::F3,
4686 PhysicalKeyboardKey::F4,
4687 PhysicalKeyboardKey::F5,
4688 PhysicalKeyboardKey::F6,
4689 PhysicalKeyboardKey::F7,
4690 PhysicalKeyboardKey::F8,
4691 PhysicalKeyboardKey::F9,
4692 PhysicalKeyboardKey::F10,
4693 PhysicalKeyboardKey::F11,
4694 PhysicalKeyboardKey::F12,
4695 PhysicalKeyboardKey::PRINT_SCREEN,
4696 PhysicalKeyboardKey::SCROLL_LOCK,
4697 PhysicalKeyboardKey::PAUSE,
4698 PhysicalKeyboardKey::INSERT,
4699 PhysicalKeyboardKey::HOME,
4700 PhysicalKeyboardKey::PAGE_UP,
4701 PhysicalKeyboardKey::DELETE,
4702 PhysicalKeyboardKey::END,
4703 PhysicalKeyboardKey::PAGE_DOWN,
4704 PhysicalKeyboardKey::ARROW_RIGHT,
4705 PhysicalKeyboardKey::ARROW_LEFT,
4706 PhysicalKeyboardKey::ARROW_DOWN,
4707 PhysicalKeyboardKey::ARROW_UP,
4708 PhysicalKeyboardKey::NUM_LOCK,
4709 PhysicalKeyboardKey::NUMPAD_DIVIDE,
4710 PhysicalKeyboardKey::NUMPAD_MULTIPLY,
4711 PhysicalKeyboardKey::NUMPAD_SUBTRACT,
4712 PhysicalKeyboardKey::NUMPAD_ADD,
4713 PhysicalKeyboardKey::NUMPAD_ENTER,
4714 PhysicalKeyboardKey::NUMPAD1,
4715 PhysicalKeyboardKey::NUMPAD2,
4716 PhysicalKeyboardKey::NUMPAD3,
4717 PhysicalKeyboardKey::NUMPAD4,
4718 PhysicalKeyboardKey::NUMPAD5,
4719 PhysicalKeyboardKey::NUMPAD6,
4720 PhysicalKeyboardKey::NUMPAD7,
4721 PhysicalKeyboardKey::NUMPAD8,
4722 PhysicalKeyboardKey::NUMPAD9,
4723 PhysicalKeyboardKey::NUMPAD0,
4724 PhysicalKeyboardKey::NUMPAD_DECIMAL,
4725 PhysicalKeyboardKey::INTL_BACKSLASH,
4726 PhysicalKeyboardKey::CONTEXT_MENU,
4727 PhysicalKeyboardKey::POWER,
4728 PhysicalKeyboardKey::NUMPAD_EQUAL,
4729 PhysicalKeyboardKey::F13,
4730 PhysicalKeyboardKey::F14,
4731 PhysicalKeyboardKey::F15,
4732 PhysicalKeyboardKey::F16,
4733 PhysicalKeyboardKey::F17,
4734 PhysicalKeyboardKey::F18,
4735 PhysicalKeyboardKey::F19,
4736 PhysicalKeyboardKey::F20,
4737 PhysicalKeyboardKey::F21,
4738 PhysicalKeyboardKey::F22,
4739 PhysicalKeyboardKey::F23,
4740 PhysicalKeyboardKey::F24,
4741 PhysicalKeyboardKey::OPEN,
4742 PhysicalKeyboardKey::HELP,
4743 PhysicalKeyboardKey::SELECT,
4744 PhysicalKeyboardKey::AGAIN,
4745 PhysicalKeyboardKey::UNDO,
4746 PhysicalKeyboardKey::CUT,
4747 PhysicalKeyboardKey::COPY,
4748 PhysicalKeyboardKey::PASTE,
4749 PhysicalKeyboardKey::FIND,
4750 PhysicalKeyboardKey::AUDIO_VOLUME_MUTE,
4751 PhysicalKeyboardKey::AUDIO_VOLUME_UP,
4752 PhysicalKeyboardKey::AUDIO_VOLUME_DOWN,
4753 PhysicalKeyboardKey::NUMPAD_COMMA,
4754 PhysicalKeyboardKey::INTL_RO,
4755 PhysicalKeyboardKey::KANA_MODE,
4756 PhysicalKeyboardKey::INTL_YEN,
4757 PhysicalKeyboardKey::CONVERT,
4758 PhysicalKeyboardKey::NON_CONVERT,
4759 PhysicalKeyboardKey::LANG1,
4760 PhysicalKeyboardKey::LANG2,
4761 PhysicalKeyboardKey::LANG3,
4762 PhysicalKeyboardKey::LANG4,
4763 PhysicalKeyboardKey::LANG5,
4764 PhysicalKeyboardKey::ABORT,
4765 PhysicalKeyboardKey::PROPS,
4766 PhysicalKeyboardKey::NUMPAD_PAREN_LEFT,
4767 PhysicalKeyboardKey::NUMPAD_PAREN_RIGHT,
4768 PhysicalKeyboardKey::NUMPAD_BACKSPACE,
4769 PhysicalKeyboardKey::NUMPAD_MEMORY_STORE,
4770 PhysicalKeyboardKey::NUMPAD_MEMORY_RECALL,
4771 PhysicalKeyboardKey::NUMPAD_MEMORY_CLEAR,
4772 PhysicalKeyboardKey::NUMPAD_MEMORY_ADD,
4773 PhysicalKeyboardKey::NUMPAD_MEMORY_SUBTRACT,
4774 PhysicalKeyboardKey::NUMPAD_SIGN_CHANGE,
4775 PhysicalKeyboardKey::NUMPAD_CLEAR,
4776 PhysicalKeyboardKey::NUMPAD_CLEAR_ENTRY,
4777 PhysicalKeyboardKey::CONTROL_LEFT,
4778 PhysicalKeyboardKey::SHIFT_LEFT,
4779 PhysicalKeyboardKey::ALT_LEFT,
4780 PhysicalKeyboardKey::META_LEFT,
4781 PhysicalKeyboardKey::CONTROL_RIGHT,
4782 PhysicalKeyboardKey::SHIFT_RIGHT,
4783 PhysicalKeyboardKey::ALT_RIGHT,
4784 PhysicalKeyboardKey::META_RIGHT,
4785 PhysicalKeyboardKey::INFO,
4786 PhysicalKeyboardKey::CLOSED_CAPTION_TOGGLE,
4787 PhysicalKeyboardKey::BRIGHTNESS_UP,
4788 PhysicalKeyboardKey::BRIGHTNESS_DOWN,
4789 PhysicalKeyboardKey::BRIGHTNESS_TOGGLE,
4790 PhysicalKeyboardKey::BRIGHTNESS_MINIMUM,
4791 PhysicalKeyboardKey::BRIGHTNESS_MAXIMUM,
4792 PhysicalKeyboardKey::BRIGHTNESS_AUTO,
4793 PhysicalKeyboardKey::KBD_ILLUM_UP,
4794 PhysicalKeyboardKey::KBD_ILLUM_DOWN,
4795 PhysicalKeyboardKey::MEDIA_LAST,
4796 PhysicalKeyboardKey::LAUNCH_PHONE,
4797 PhysicalKeyboardKey::PROGRAM_GUIDE,
4798 PhysicalKeyboardKey::EXIT,
4799 PhysicalKeyboardKey::CHANNEL_UP,
4800 PhysicalKeyboardKey::CHANNEL_DOWN,
4801 PhysicalKeyboardKey::MEDIA_PLAY,
4802 PhysicalKeyboardKey::MEDIA_PAUSE,
4803 PhysicalKeyboardKey::MEDIA_RECORD,
4804 PhysicalKeyboardKey::MEDIA_FAST_FORWARD,
4805 PhysicalKeyboardKey::MEDIA_REWIND,
4806 PhysicalKeyboardKey::MEDIA_TRACK_NEXT,
4807 PhysicalKeyboardKey::MEDIA_TRACK_PREVIOUS,
4808 PhysicalKeyboardKey::MEDIA_STOP,
4809 PhysicalKeyboardKey::EJECT,
4810 PhysicalKeyboardKey::MEDIA_PLAY_PAUSE,
4811 PhysicalKeyboardKey::SPEECH_INPUT_TOGGLE,
4812 PhysicalKeyboardKey::BASS_BOOST,
4813 PhysicalKeyboardKey::MEDIA_SELECT,
4814 PhysicalKeyboardKey::LAUNCH_WORD_PROCESSOR,
4815 PhysicalKeyboardKey::LAUNCH_SPREADSHEET,
4816 PhysicalKeyboardKey::LAUNCH_MAIL,
4817 PhysicalKeyboardKey::LAUNCH_CONTACTS,
4818 PhysicalKeyboardKey::LAUNCH_CALENDAR,
4819 PhysicalKeyboardKey::LAUNCH_APP2,
4820 PhysicalKeyboardKey::LAUNCH_APP1,
4821 PhysicalKeyboardKey::LAUNCH_INTERNET_BROWSER,
4822 PhysicalKeyboardKey::LOG_OFF,
4823 PhysicalKeyboardKey::LOCK_SCREEN,
4824 PhysicalKeyboardKey::LAUNCH_CONTROL_PANEL,
4825 PhysicalKeyboardKey::SELECT_TASK,
4826 PhysicalKeyboardKey::LAUNCH_DOCUMENTS,
4827 PhysicalKeyboardKey::SPELL_CHECK,
4828 PhysicalKeyboardKey::LAUNCH_KEYBOARD_LAYOUT,
4829 PhysicalKeyboardKey::LAUNCH_SCREEN_SAVER,
4830 PhysicalKeyboardKey::LAUNCH_AUDIO_BROWSER,
4831 PhysicalKeyboardKey::LAUNCH_ASSISTANT,
4832 PhysicalKeyboardKey::NEW_KEY,
4833 PhysicalKeyboardKey::CLOSE,
4834 PhysicalKeyboardKey::SAVE,
4835 PhysicalKeyboardKey::PRINT,
4836 PhysicalKeyboardKey::BROWSER_SEARCH,
4837 PhysicalKeyboardKey::BROWSER_HOME,
4838 PhysicalKeyboardKey::BROWSER_BACK,
4839 PhysicalKeyboardKey::BROWSER_FORWARD,
4840 PhysicalKeyboardKey::BROWSER_STOP,
4841 PhysicalKeyboardKey::BROWSER_REFRESH,
4842 PhysicalKeyboardKey::BROWSER_FAVORITES,
4843 PhysicalKeyboardKey::ZOOM_IN,
4844 PhysicalKeyboardKey::ZOOM_OUT,
4845 PhysicalKeyboardKey::ZOOM_TOGGLE,
4846 PhysicalKeyboardKey::REDO,
4847 PhysicalKeyboardKey::MAIL_REPLY,
4848 PhysicalKeyboardKey::MAIL_FORWARD,
4849 PhysicalKeyboardKey::MAIL_SEND,
4850 PhysicalKeyboardKey::KEYBOARD_LAYOUT_SELECT,
4851 PhysicalKeyboardKey::SHOW_ALL_WINDOWS,
4852];
4853
4854static SYNONYMS: &[(LogicalKeyboardKey, &[LogicalKeyboardKey])] = &[
4855 (LogicalKeyboardKey::SHIFT_LEFT, &[LogicalKeyboardKey::SHIFT]),
4856 (
4857 LogicalKeyboardKey::SHIFT_RIGHT,
4858 &[LogicalKeyboardKey::SHIFT],
4859 ),
4860 (LogicalKeyboardKey::META_LEFT, &[LogicalKeyboardKey::META]),
4861 (LogicalKeyboardKey::META_RIGHT, &[LogicalKeyboardKey::META]),
4862 (LogicalKeyboardKey::ALT_LEFT, &[LogicalKeyboardKey::ALT]),
4863 (LogicalKeyboardKey::ALT_RIGHT, &[LogicalKeyboardKey::ALT]),
4864 (
4865 LogicalKeyboardKey::CONTROL_LEFT,
4866 &[LogicalKeyboardKey::CONTROL],
4867 ),
4868 (
4869 LogicalKeyboardKey::CONTROL_RIGHT,
4870 &[LogicalKeyboardKey::CONTROL],
4871 ),
4872];
4873
4874static REVERSE_SYNONYMS: &[(LogicalKeyboardKey, &[LogicalKeyboardKey])] = &[
4875 (
4876 LogicalKeyboardKey::SHIFT,
4877 &[
4878 LogicalKeyboardKey::SHIFT_LEFT,
4879 LogicalKeyboardKey::SHIFT_RIGHT,
4880 ],
4881 ),
4882 (
4883 LogicalKeyboardKey::META,
4884 &[
4885 LogicalKeyboardKey::META_LEFT,
4886 LogicalKeyboardKey::META_RIGHT,
4887 ],
4888 ),
4889 (
4890 LogicalKeyboardKey::ALT,
4891 &[LogicalKeyboardKey::ALT_LEFT, LogicalKeyboardKey::ALT_RIGHT],
4892 ),
4893 (
4894 LogicalKeyboardKey::CONTROL,
4895 &[
4896 LogicalKeyboardKey::CONTROL_LEFT,
4897 LogicalKeyboardKey::CONTROL_RIGHT,
4898 ],
4899 ),
4900];
4901
4902static KEY_LABELS: &[(u64, &str)] = &[
4903 (0x00000000020, "Space"),
4904 (0x00000000021, "Exclamation"),
4905 (0x00000000022, "Quote"),
4906 (0x00000000023, "Number Sign"),
4907 (0x00000000024, "Dollar"),
4908 (0x00000000025, "Percent"),
4909 (0x00000000026, "Ampersand"),
4910 (0x00000000027, "Quote Single"),
4911 (0x00000000028, "Parenthesis Left"),
4912 (0x00000000029, "Parenthesis Right"),
4913 (0x0000000002a, "Asterisk"),
4914 (0x0000000002b, "Add"),
4915 (0x0000000002c, "Comma"),
4916 (0x0000000002d, "Minus"),
4917 (0x0000000002e, "Period"),
4918 (0x0000000002f, "Slash"),
4919 (0x00000000030, "Digit 0"),
4920 (0x00000000031, "Digit 1"),
4921 (0x00000000032, "Digit 2"),
4922 (0x00000000033, "Digit 3"),
4923 (0x00000000034, "Digit 4"),
4924 (0x00000000035, "Digit 5"),
4925 (0x00000000036, "Digit 6"),
4926 (0x00000000037, "Digit 7"),
4927 (0x00000000038, "Digit 8"),
4928 (0x00000000039, "Digit 9"),
4929 (0x0000000003a, "Colon"),
4930 (0x0000000003b, "Semicolon"),
4931 (0x0000000003c, "Less"),
4932 (0x0000000003d, "Equal"),
4933 (0x0000000003e, "Greater"),
4934 (0x0000000003f, "Question"),
4935 (0x00000000040, "At"),
4936 (0x0000000005b, "Bracket Left"),
4937 (0x0000000005c, "Backslash"),
4938 (0x0000000005d, "Bracket Right"),
4939 (0x0000000005e, "Caret"),
4940 (0x0000000005f, "Underscore"),
4941 (0x00000000060, "Backquote"),
4942 (0x00000000061, "Key A"),
4943 (0x00000000062, "Key B"),
4944 (0x00000000063, "Key C"),
4945 (0x00000000064, "Key D"),
4946 (0x00000000065, "Key E"),
4947 (0x00000000066, "Key F"),
4948 (0x00000000067, "Key G"),
4949 (0x00000000068, "Key H"),
4950 (0x00000000069, "Key I"),
4951 (0x0000000006a, "Key J"),
4952 (0x0000000006b, "Key K"),
4953 (0x0000000006c, "Key L"),
4954 (0x0000000006d, "Key M"),
4955 (0x0000000006e, "Key N"),
4956 (0x0000000006f, "Key O"),
4957 (0x00000000070, "Key P"),
4958 (0x00000000071, "Key Q"),
4959 (0x00000000072, "Key R"),
4960 (0x00000000073, "Key S"),
4961 (0x00000000074, "Key T"),
4962 (0x00000000075, "Key U"),
4963 (0x00000000076, "Key V"),
4964 (0x00000000077, "Key W"),
4965 (0x00000000078, "Key X"),
4966 (0x00000000079, "Key Y"),
4967 (0x0000000007a, "Key Z"),
4968 (0x0000000007b, "Brace Left"),
4969 (0x0000000007c, "Bar"),
4970 (0x0000000007d, "Brace Right"),
4971 (0x0000000007e, "Tilde"),
4972 (0x00100000001, "Unidentified"),
4973 (0x00100000008, "Backspace"),
4974 (0x00100000009, "Tab"),
4975 (0x0010000000d, "Enter"),
4976 (0x0010000001b, "Escape"),
4977 (0x0010000007f, "Delete"),
4978 (0x00100000101, "Accel"),
4979 (0x00100000103, "Alt Graph"),
4980 (0x00100000104, "Caps Lock"),
4981 (0x00100000106, "Fn"),
4982 (0x00100000107, "Fn Lock"),
4983 (0x00100000108, "Hyper"),
4984 (0x0010000010a, "Num Lock"),
4985 (0x0010000010c, "Scroll Lock"),
4986 (0x0010000010e, "Super"),
4987 (0x0010000010f, "Symbol"),
4988 (0x00100000110, "Symbol Lock"),
4989 (0x00100000111, "Shift Level 5"),
4990 (0x00100000301, "Arrow Down"),
4991 (0x00100000302, "Arrow Left"),
4992 (0x00100000303, "Arrow Right"),
4993 (0x00100000304, "Arrow Up"),
4994 (0x00100000305, "End"),
4995 (0x00100000306, "Home"),
4996 (0x00100000307, "Page Down"),
4997 (0x00100000308, "Page Up"),
4998 (0x00100000401, "Clear"),
4999 (0x00100000402, "Copy"),
5000 (0x00100000403, "Cr Sel"),
5001 (0x00100000404, "Cut"),
5002 (0x00100000405, "Erase Eof"),
5003 (0x00100000406, "Ex Sel"),
5004 (0x00100000407, "Insert"),
5005 (0x00100000408, "Paste"),
5006 (0x00100000409, "Redo"),
5007 (0x0010000040a, "Undo"),
5008 (0x00100000501, "Accept"),
5009 (0x00100000502, "Again"),
5010 (0x00100000503, "Attn"),
5011 (0x00100000504, "Cancel"),
5012 (0x00100000505, "Context Menu"),
5013 (0x00100000506, "Execute"),
5014 (0x00100000507, "Find"),
5015 (0x00100000508, "Help"),
5016 (0x00100000509, "Pause"),
5017 (0x0010000050a, "Play"),
5018 (0x0010000050b, "Props"),
5019 (0x0010000050c, "Select"),
5020 (0x0010000050d, "Zoom In"),
5021 (0x0010000050e, "Zoom Out"),
5022 (0x00100000601, "Brightness Down"),
5023 (0x00100000602, "Brightness Up"),
5024 (0x00100000603, "Camera"),
5025 (0x00100000604, "Eject"),
5026 (0x00100000605, "Log Off"),
5027 (0x00100000606, "Power"),
5028 (0x00100000607, "Power Off"),
5029 (0x00100000608, "Print Screen"),
5030 (0x00100000609, "Hibernate"),
5031 (0x0010000060a, "Standby"),
5032 (0x0010000060b, "Wake Up"),
5033 (0x00100000701, "All Candidates"),
5034 (0x00100000702, "Alphanumeric"),
5035 (0x00100000703, "Code Input"),
5036 (0x00100000704, "Compose"),
5037 (0x00100000705, "Convert"),
5038 (0x00100000706, "Final Mode"),
5039 (0x00100000707, "Group First"),
5040 (0x00100000708, "Group Last"),
5041 (0x00100000709, "Group Next"),
5042 (0x0010000070a, "Group Previous"),
5043 (0x0010000070b, "Mode Change"),
5044 (0x0010000070c, "Next Candidate"),
5045 (0x0010000070d, "Non Convert"),
5046 (0x0010000070e, "Previous Candidate"),
5047 (0x0010000070f, "Process"),
5048 (0x00100000710, "Single Candidate"),
5049 (0x00100000711, "Hangul Mode"),
5050 (0x00100000712, "Hanja Mode"),
5051 (0x00100000713, "Junja Mode"),
5052 (0x00100000714, "Eisu"),
5053 (0x00100000715, "Hankaku"),
5054 (0x00100000716, "Hiragana"),
5055 (0x00100000717, "Hiragana Katakana"),
5056 (0x00100000718, "Kana Mode"),
5057 (0x00100000719, "Kanji Mode"),
5058 (0x0010000071a, "Katakana"),
5059 (0x0010000071b, "Romaji"),
5060 (0x0010000071c, "Zenkaku"),
5061 (0x0010000071d, "Zenkaku Hankaku"),
5062 (0x00100000801, "F1"),
5063 (0x00100000802, "F2"),
5064 (0x00100000803, "F3"),
5065 (0x00100000804, "F4"),
5066 (0x00100000805, "F5"),
5067 (0x00100000806, "F6"),
5068 (0x00100000807, "F7"),
5069 (0x00100000808, "F8"),
5070 (0x00100000809, "F9"),
5071 (0x0010000080a, "F10"),
5072 (0x0010000080b, "F11"),
5073 (0x0010000080c, "F12"),
5074 (0x0010000080d, "F13"),
5075 (0x0010000080e, "F14"),
5076 (0x0010000080f, "F15"),
5077 (0x00100000810, "F16"),
5078 (0x00100000811, "F17"),
5079 (0x00100000812, "F18"),
5080 (0x00100000813, "F19"),
5081 (0x00100000814, "F20"),
5082 (0x00100000815, "F21"),
5083 (0x00100000816, "F22"),
5084 (0x00100000817, "F23"),
5085 (0x00100000818, "F24"),
5086 (0x00100000901, "Soft 1"),
5087 (0x00100000902, "Soft 2"),
5088 (0x00100000903, "Soft 3"),
5089 (0x00100000904, "Soft 4"),
5090 (0x00100000905, "Soft 5"),
5091 (0x00100000906, "Soft 6"),
5092 (0x00100000907, "Soft 7"),
5093 (0x00100000908, "Soft 8"),
5094 (0x00100000a01, "Close"),
5095 (0x00100000a02, "Mail Forward"),
5096 (0x00100000a03, "Mail Reply"),
5097 (0x00100000a04, "Mail Send"),
5098 (0x00100000a05, "Media Play Pause"),
5099 (0x00100000a07, "Media Stop"),
5100 (0x00100000a08, "Media Track Next"),
5101 (0x00100000a09, "Media Track Previous"),
5102 (0x00100000a0a, "New"),
5103 (0x00100000a0b, "Open"),
5104 (0x00100000a0c, "Print"),
5105 (0x00100000a0d, "Save"),
5106 (0x00100000a0e, "Spell Check"),
5107 (0x00100000a0f, "Audio Volume Down"),
5108 (0x00100000a10, "Audio Volume Up"),
5109 (0x00100000a11, "Audio Volume Mute"),
5110 (0x00100000b01, "Launch Application 2"),
5111 (0x00100000b02, "Launch Calendar"),
5112 (0x00100000b03, "Launch Mail"),
5113 (0x00100000b04, "Launch Media Player"),
5114 (0x00100000b05, "Launch Music Player"),
5115 (0x00100000b06, "Launch Application 1"),
5116 (0x00100000b07, "Launch Screen Saver"),
5117 (0x00100000b08, "Launch Spreadsheet"),
5118 (0x00100000b09, "Launch Web Browser"),
5119 (0x00100000b0a, "Launch Web Cam"),
5120 (0x00100000b0b, "Launch Word Processor"),
5121 (0x00100000b0c, "Launch Contacts"),
5122 (0x00100000b0d, "Launch Phone"),
5123 (0x00100000b0e, "Launch Assistant"),
5124 (0x00100000b0f, "Launch Control Panel"),
5125 (0x00100000c01, "Browser Back"),
5126 (0x00100000c02, "Browser Favorites"),
5127 (0x00100000c03, "Browser Forward"),
5128 (0x00100000c04, "Browser Home"),
5129 (0x00100000c05, "Browser Refresh"),
5130 (0x00100000c06, "Browser Search"),
5131 (0x00100000c07, "Browser Stop"),
5132 (0x00100000d01, "Audio Balance Left"),
5133 (0x00100000d02, "Audio Balance Right"),
5134 (0x00100000d03, "Audio Bass Boost Down"),
5135 (0x00100000d04, "Audio Bass Boost Up"),
5136 (0x00100000d05, "Audio Fader Front"),
5137 (0x00100000d06, "Audio Fader Rear"),
5138 (0x00100000d07, "Audio Surround Mode Next"),
5139 (0x00100000d08, "AVR Input"),
5140 (0x00100000d09, "AVR Power"),
5141 (0x00100000d0a, "Channel Down"),
5142 (0x00100000d0b, "Channel Up"),
5143 (0x00100000d0c, "Color F0 Red"),
5144 (0x00100000d0d, "Color F1 Green"),
5145 (0x00100000d0e, "Color F2 Yellow"),
5146 (0x00100000d0f, "Color F3 Blue"),
5147 (0x00100000d10, "Color F4 Grey"),
5148 (0x00100000d11, "Color F5 Brown"),
5149 (0x00100000d12, "Closed Caption Toggle"),
5150 (0x00100000d13, "Dimmer"),
5151 (0x00100000d14, "Display Swap"),
5152 (0x00100000d15, "Exit"),
5153 (0x00100000d16, "Favorite Clear 0"),
5154 (0x00100000d17, "Favorite Clear 1"),
5155 (0x00100000d18, "Favorite Clear 2"),
5156 (0x00100000d19, "Favorite Clear 3"),
5157 (0x00100000d1a, "Favorite Recall 0"),
5158 (0x00100000d1b, "Favorite Recall 1"),
5159 (0x00100000d1c, "Favorite Recall 2"),
5160 (0x00100000d1d, "Favorite Recall 3"),
5161 (0x00100000d1e, "Favorite Store 0"),
5162 (0x00100000d1f, "Favorite Store 1"),
5163 (0x00100000d20, "Favorite Store 2"),
5164 (0x00100000d21, "Favorite Store 3"),
5165 (0x00100000d22, "Guide"),
5166 (0x00100000d23, "Guide Next Day"),
5167 (0x00100000d24, "Guide Previous Day"),
5168 (0x00100000d25, "Info"),
5169 (0x00100000d26, "Instant Replay"),
5170 (0x00100000d27, "Link"),
5171 (0x00100000d28, "List Program"),
5172 (0x00100000d29, "Live Content"),
5173 (0x00100000d2a, "Lock"),
5174 (0x00100000d2b, "Media Apps"),
5175 (0x00100000d2c, "Media Fast Forward"),
5176 (0x00100000d2d, "Media Last"),
5177 (0x00100000d2e, "Media Pause"),
5178 (0x00100000d2f, "Media Play"),
5179 (0x00100000d30, "Media Record"),
5180 (0x00100000d31, "Media Rewind"),
5181 (0x00100000d32, "Media Skip"),
5182 (0x00100000d33, "Next Favorite Channel"),
5183 (0x00100000d34, "Next User Profile"),
5184 (0x00100000d35, "On Demand"),
5185 (0x00100000d36, "P In P Down"),
5186 (0x00100000d37, "P In P Move"),
5187 (0x00100000d38, "P In P Toggle"),
5188 (0x00100000d39, "P In P Up"),
5189 (0x00100000d3a, "Play Speed Down"),
5190 (0x00100000d3b, "Play Speed Reset"),
5191 (0x00100000d3c, "Play Speed Up"),
5192 (0x00100000d3d, "Random Toggle"),
5193 (0x00100000d3e, "Rc Low Battery"),
5194 (0x00100000d3f, "Record Speed Next"),
5195 (0x00100000d40, "Rf Bypass"),
5196 (0x00100000d41, "Scan Channels Toggle"),
5197 (0x00100000d42, "Screen Mode Next"),
5198 (0x00100000d43, "Settings"),
5199 (0x00100000d44, "Split Screen Toggle"),
5200 (0x00100000d45, "STB Input"),
5201 (0x00100000d46, "STB Power"),
5202 (0x00100000d47, "Subtitle"),
5203 (0x00100000d48, "Teletext"),
5204 (0x00100000d49, "TV"),
5205 (0x00100000d4a, "TV Input"),
5206 (0x00100000d4b, "TV Power"),
5207 (0x00100000d4c, "Video Mode Next"),
5208 (0x00100000d4d, "Wink"),
5209 (0x00100000d4e, "Zoom Toggle"),
5210 (0x00100000d4f, "DVR"),
5211 (0x00100000d50, "Media Audio Track"),
5212 (0x00100000d51, "Media Skip Backward"),
5213 (0x00100000d52, "Media Skip Forward"),
5214 (0x00100000d53, "Media Step Backward"),
5215 (0x00100000d54, "Media Step Forward"),
5216 (0x00100000d55, "Media Top Menu"),
5217 (0x00100000d56, "Navigate In"),
5218 (0x00100000d57, "Navigate Next"),
5219 (0x00100000d58, "Navigate Out"),
5220 (0x00100000d59, "Navigate Previous"),
5221 (0x00100000d5a, "Pairing"),
5222 (0x00100000d5b, "Media Close"),
5223 (0x00100000e02, "Audio Bass Boost Toggle"),
5224 (0x00100000e04, "Audio Treble Down"),
5225 (0x00100000e05, "Audio Treble Up"),
5226 (0x00100000e06, "Microphone Toggle"),
5227 (0x00100000e07, "Microphone Volume Down"),
5228 (0x00100000e08, "Microphone Volume Up"),
5229 (0x00100000e09, "Microphone Volume Mute"),
5230 (0x00100000f01, "Speech Correction List"),
5231 (0x00100000f02, "Speech Input Toggle"),
5232 (0x00100001001, "App Switch"),
5233 (0x00100001002, "Call"),
5234 (0x00100001003, "Camera Focus"),
5235 (0x00100001004, "End Call"),
5236 (0x00100001005, "Go Back"),
5237 (0x00100001006, "Go Home"),
5238 (0x00100001007, "Headset Hook"),
5239 (0x00100001008, "Last Number Redial"),
5240 (0x00100001009, "Notification"),
5241 (0x0010000100a, "Manner Mode"),
5242 (0x0010000100b, "Voice Dial"),
5243 (0x00100001101, "TV 3 D Mode"),
5244 (0x00100001102, "TV Antenna Cable"),
5245 (0x00100001103, "TV Audio Description"),
5246 (0x00100001104, "TV Audio Description Mix Down"),
5247 (0x00100001105, "TV Audio Description Mix Up"),
5248 (0x00100001106, "TV Contents Menu"),
5249 (0x00100001107, "TV Data Service"),
5250 (0x00100001108, "TV Input Component 1"),
5251 (0x00100001109, "TV Input Component 2"),
5252 (0x0010000110a, "TV Input Composite 1"),
5253 (0x0010000110b, "TV Input Composite 2"),
5254 (0x0010000110c, "TV Input HDMI 1"),
5255 (0x0010000110d, "TV Input HDMI 2"),
5256 (0x0010000110e, "TV Input HDMI 3"),
5257 (0x0010000110f, "TV Input HDMI 4"),
5258 (0x00100001110, "TV Input VGA 1"),
5259 (0x00100001111, "TV Media Context"),
5260 (0x00100001112, "TV Network"),
5261 (0x00100001113, "TV Number Entry"),
5262 (0x00100001114, "TV Radio Service"),
5263 (0x00100001115, "TV Satellite"),
5264 (0x00100001116, "TV Satellite BS"),
5265 (0x00100001117, "TV Satellite CS"),
5266 (0x00100001118, "TV Satellite Toggle"),
5267 (0x00100001119, "TV Terrestrial Analog"),
5268 (0x0010000111a, "TV Terrestrial Digital"),
5269 (0x0010000111b, "TV Timer"),
5270 (0x00100001201, "Key 11"),
5271 (0x00100001202, "Key 12"),
5272 (0x00200000000, "Suspend"),
5273 (0x00200000001, "Resume"),
5274 (0x00200000002, "Sleep"),
5275 (0x00200000003, "Abort"),
5276 (0x00200000010, "Lang 1"),
5277 (0x00200000011, "Lang 2"),
5278 (0x00200000012, "Lang 3"),
5279 (0x00200000013, "Lang 4"),
5280 (0x00200000014, "Lang 5"),
5281 (0x00200000020, "Intl Backslash"),
5282 (0x00200000021, "Intl Ro"),
5283 (0x00200000022, "Intl Yen"),
5284 (0x00200000100, "Control Left"),
5285 (0x00200000101, "Control Right"),
5286 (0x00200000102, "Shift Left"),
5287 (0x00200000103, "Shift Right"),
5288 (0x00200000104, "Alt Left"),
5289 (0x00200000105, "Alt Right"),
5290 (0x00200000106, "Meta Left"),
5291 (0x00200000107, "Meta Right"),
5292 (0x002000001f0, "Control"),
5293 (0x002000001f2, "Shift"),
5294 (0x002000001f4, "Alt"),
5295 (0x002000001f6, "Meta"),
5296 (0x0020000020d, "Numpad Enter"),
5297 (0x00200000228, "Numpad Paren Left"),
5298 (0x00200000229, "Numpad Paren Right"),
5299 (0x0020000022a, "Numpad Multiply"),
5300 (0x0020000022b, "Numpad Add"),
5301 (0x0020000022c, "Numpad Comma"),
5302 (0x0020000022d, "Numpad Subtract"),
5303 (0x0020000022e, "Numpad Decimal"),
5304 (0x0020000022f, "Numpad Divide"),
5305 (0x00200000230, "Numpad 0"),
5306 (0x00200000231, "Numpad 1"),
5307 (0x00200000232, "Numpad 2"),
5308 (0x00200000233, "Numpad 3"),
5309 (0x00200000234, "Numpad 4"),
5310 (0x00200000235, "Numpad 5"),
5311 (0x00200000236, "Numpad 6"),
5312 (0x00200000237, "Numpad 7"),
5313 (0x00200000238, "Numpad 8"),
5314 (0x00200000239, "Numpad 9"),
5315 (0x0020000023d, "Numpad Equal"),
5316 (0x00200000301, "Game Button 1"),
5317 (0x00200000302, "Game Button 2"),
5318 (0x00200000303, "Game Button 3"),
5319 (0x00200000304, "Game Button 4"),
5320 (0x00200000305, "Game Button 5"),
5321 (0x00200000306, "Game Button 6"),
5322 (0x00200000307, "Game Button 7"),
5323 (0x00200000308, "Game Button 8"),
5324 (0x00200000309, "Game Button 9"),
5325 (0x0020000030a, "Game Button 10"),
5326 (0x0020000030b, "Game Button 11"),
5327 (0x0020000030c, "Game Button 12"),
5328 (0x0020000030d, "Game Button 13"),
5329 (0x0020000030e, "Game Button 14"),
5330 (0x0020000030f, "Game Button 15"),
5331 (0x00200000310, "Game Button 16"),
5332 (0x00200000311, "Game Button A"),
5333 (0x00200000312, "Game Button B"),
5334 (0x00200000313, "Game Button C"),
5335 (0x00200000314, "Game Button Left 1"),
5336 (0x00200000315, "Game Button Left 2"),
5337 (0x00200000316, "Game Button Mode"),
5338 (0x00200000317, "Game Button Right 1"),
5339 (0x00200000318, "Game Button Right 2"),
5340 (0x00200000319, "Game Button Select"),
5341 (0x0020000031a, "Game Button Start"),
5342 (0x0020000031b, "Game Button Thumb Left"),
5343 (0x0020000031c, "Game Button Thumb Right"),
5344 (0x0020000031d, "Game Button X"),
5345 (0x0020000031e, "Game Button Y"),
5346 (0x0020000031f, "Game Button Z"),
5347];
5348
5349static DEBUG_NAMES: &[(u64, &str)] = &[
5350 (0x00000010, "Hyper"),
5351 (0x00000011, "Super Key"),
5352 (0x00000012, "Fn"),
5353 (0x00000013, "Fn Lock"),
5354 (0x00000014, "Suspend"),
5355 (0x00000015, "Resume"),
5356 (0x00000016, "Turbo"),
5357 (0x00000017, "Privacy Screen Toggle"),
5358 (0x00000018, "Microphone Mute Toggle"),
5359 (0x00010082, "Sleep"),
5360 (0x00010083, "Wake Up"),
5361 (0x000100b5, "Display Toggle Int Ext"),
5362 (0x0005ff01, "Game Button 1"),
5363 (0x0005ff02, "Game Button 2"),
5364 (0x0005ff03, "Game Button 3"),
5365 (0x0005ff04, "Game Button 4"),
5366 (0x0005ff05, "Game Button 5"),
5367 (0x0005ff06, "Game Button 6"),
5368 (0x0005ff07, "Game Button 7"),
5369 (0x0005ff08, "Game Button 8"),
5370 (0x0005ff09, "Game Button 9"),
5371 (0x0005ff0a, "Game Button 10"),
5372 (0x0005ff0b, "Game Button 11"),
5373 (0x0005ff0c, "Game Button 12"),
5374 (0x0005ff0d, "Game Button 13"),
5375 (0x0005ff0e, "Game Button 14"),
5376 (0x0005ff0f, "Game Button 15"),
5377 (0x0005ff10, "Game Button 16"),
5378 (0x0005ff11, "Game Button A"),
5379 (0x0005ff12, "Game Button B"),
5380 (0x0005ff13, "Game Button C"),
5381 (0x0005ff14, "Game Button Left 1"),
5382 (0x0005ff15, "Game Button Left 2"),
5383 (0x0005ff16, "Game Button Mode"),
5384 (0x0005ff17, "Game Button Right 1"),
5385 (0x0005ff18, "Game Button Right 2"),
5386 (0x0005ff19, "Game Button Select"),
5387 (0x0005ff1a, "Game Button Start"),
5388 (0x0005ff1b, "Game Button Thumb Left"),
5389 (0x0005ff1c, "Game Button Thumb Right"),
5390 (0x0005ff1d, "Game Button X"),
5391 (0x0005ff1e, "Game Button Y"),
5392 (0x0005ff1f, "Game Button Z"),
5393 (0x00070000, "Usb Reserved"),
5394 (0x00070001, "Usb Error Roll Over"),
5395 (0x00070002, "Usb Post Fail"),
5396 (0x00070003, "Usb Error Undefined"),
5397 (0x00070004, "Key A"),
5398 (0x00070005, "Key B"),
5399 (0x00070006, "Key C"),
5400 (0x00070007, "Key D"),
5401 (0x00070008, "Key E"),
5402 (0x00070009, "Key F"),
5403 (0x0007000a, "Key G"),
5404 (0x0007000b, "Key H"),
5405 (0x0007000c, "Key I"),
5406 (0x0007000d, "Key J"),
5407 (0x0007000e, "Key K"),
5408 (0x0007000f, "Key L"),
5409 (0x00070010, "Key M"),
5410 (0x00070011, "Key N"),
5411 (0x00070012, "Key O"),
5412 (0x00070013, "Key P"),
5413 (0x00070014, "Key Q"),
5414 (0x00070015, "Key R"),
5415 (0x00070016, "Key S"),
5416 (0x00070017, "Key T"),
5417 (0x00070018, "Key U"),
5418 (0x00070019, "Key V"),
5419 (0x0007001a, "Key W"),
5420 (0x0007001b, "Key X"),
5421 (0x0007001c, "Key Y"),
5422 (0x0007001d, "Key Z"),
5423 (0x0007001e, "Digit 1"),
5424 (0x0007001f, "Digit 2"),
5425 (0x00070020, "Digit 3"),
5426 (0x00070021, "Digit 4"),
5427 (0x00070022, "Digit 5"),
5428 (0x00070023, "Digit 6"),
5429 (0x00070024, "Digit 7"),
5430 (0x00070025, "Digit 8"),
5431 (0x00070026, "Digit 9"),
5432 (0x00070027, "Digit 0"),
5433 (0x00070028, "Enter"),
5434 (0x00070029, "Escape"),
5435 (0x0007002a, "Backspace"),
5436 (0x0007002b, "Tab"),
5437 (0x0007002c, "Space"),
5438 (0x0007002d, "Minus"),
5439 (0x0007002e, "Equal"),
5440 (0x0007002f, "Bracket Left"),
5441 (0x00070030, "Bracket Right"),
5442 (0x00070031, "Backslash"),
5443 (0x00070033, "Semicolon"),
5444 (0x00070034, "Quote"),
5445 (0x00070035, "Backquote"),
5446 (0x00070036, "Comma"),
5447 (0x00070037, "Period"),
5448 (0x00070038, "Slash"),
5449 (0x00070039, "Caps Lock"),
5450 (0x0007003a, "F1"),
5451 (0x0007003b, "F2"),
5452 (0x0007003c, "F3"),
5453 (0x0007003d, "F4"),
5454 (0x0007003e, "F5"),
5455 (0x0007003f, "F6"),
5456 (0x00070040, "F7"),
5457 (0x00070041, "F8"),
5458 (0x00070042, "F9"),
5459 (0x00070043, "F10"),
5460 (0x00070044, "F11"),
5461 (0x00070045, "F12"),
5462 (0x00070046, "Print Screen"),
5463 (0x00070047, "Scroll Lock"),
5464 (0x00070048, "Pause"),
5465 (0x00070049, "Insert"),
5466 (0x0007004a, "Home"),
5467 (0x0007004b, "Page Up"),
5468 (0x0007004c, "Delete"),
5469 (0x0007004d, "End"),
5470 (0x0007004e, "Page Down"),
5471 (0x0007004f, "Arrow Right"),
5472 (0x00070050, "Arrow Left"),
5473 (0x00070051, "Arrow Down"),
5474 (0x00070052, "Arrow Up"),
5475 (0x00070053, "Num Lock"),
5476 (0x00070054, "Numpad Divide"),
5477 (0x00070055, "Numpad Multiply"),
5478 (0x00070056, "Numpad Subtract"),
5479 (0x00070057, "Numpad Add"),
5480 (0x00070058, "Numpad Enter"),
5481 (0x00070059, "Numpad 1"),
5482 (0x0007005a, "Numpad 2"),
5483 (0x0007005b, "Numpad 3"),
5484 (0x0007005c, "Numpad 4"),
5485 (0x0007005d, "Numpad 5"),
5486 (0x0007005e, "Numpad 6"),
5487 (0x0007005f, "Numpad 7"),
5488 (0x00070060, "Numpad 8"),
5489 (0x00070061, "Numpad 9"),
5490 (0x00070062, "Numpad 0"),
5491 (0x00070063, "Numpad Decimal"),
5492 (0x00070064, "Intl Backslash"),
5493 (0x00070065, "Context Menu"),
5494 (0x00070066, "Power"),
5495 (0x00070067, "Numpad Equal"),
5496 (0x00070068, "F13"),
5497 (0x00070069, "F14"),
5498 (0x0007006a, "F15"),
5499 (0x0007006b, "F16"),
5500 (0x0007006c, "F17"),
5501 (0x0007006d, "F18"),
5502 (0x0007006e, "F19"),
5503 (0x0007006f, "F20"),
5504 (0x00070070, "F21"),
5505 (0x00070071, "F22"),
5506 (0x00070072, "F23"),
5507 (0x00070073, "F24"),
5508 (0x00070074, "Open"),
5509 (0x00070075, "Help"),
5510 (0x00070077, "Select"),
5511 (0x00070079, "Again"),
5512 (0x0007007a, "Undo"),
5513 (0x0007007b, "Cut"),
5514 (0x0007007c, "Copy"),
5515 (0x0007007d, "Paste"),
5516 (0x0007007e, "Find"),
5517 (0x0007007f, "Audio Volume Mute"),
5518 (0x00070080, "Audio Volume Up"),
5519 (0x00070081, "Audio Volume Down"),
5520 (0x00070085, "Numpad Comma"),
5521 (0x00070087, "Intl Ro"),
5522 (0x00070088, "Kana Mode"),
5523 (0x00070089, "Intl Yen"),
5524 (0x0007008a, "Convert"),
5525 (0x0007008b, "Non Convert"),
5526 (0x00070090, "Lang 1"),
5527 (0x00070091, "Lang 2"),
5528 (0x00070092, "Lang 3"),
5529 (0x00070093, "Lang 4"),
5530 (0x00070094, "Lang 5"),
5531 (0x0007009b, "Abort"),
5532 (0x000700a3, "Props"),
5533 (0x000700b6, "Numpad Paren Left"),
5534 (0x000700b7, "Numpad Paren Right"),
5535 (0x000700bb, "Numpad Backspace"),
5536 (0x000700d0, "Numpad Memory Store"),
5537 (0x000700d1, "Numpad Memory Recall"),
5538 (0x000700d2, "Numpad Memory Clear"),
5539 (0x000700d3, "Numpad Memory Add"),
5540 (0x000700d4, "Numpad Memory Subtract"),
5541 (0x000700d7, "Numpad Sign Change"),
5542 (0x000700d8, "Numpad Clear"),
5543 (0x000700d9, "Numpad Clear Entry"),
5544 (0x000700e0, "Control Left"),
5545 (0x000700e1, "Shift Left"),
5546 (0x000700e2, "Alt Left"),
5547 (0x000700e3, "Meta Left"),
5548 (0x000700e4, "Control Right"),
5549 (0x000700e5, "Shift Right"),
5550 (0x000700e6, "Alt Right"),
5551 (0x000700e7, "Meta Right"),
5552 (0x000c0060, "Info"),
5553 (0x000c0061, "Closed Caption Toggle"),
5554 (0x000c006f, "Brightness Up"),
5555 (0x000c0070, "Brightness Down"),
5556 (0x000c0072, "Brightness Toggle"),
5557 (0x000c0073, "Brightness Minimum"),
5558 (0x000c0074, "Brightness Maximum"),
5559 (0x000c0075, "Brightness Auto"),
5560 (0x000c0079, "Kbd Illum Up"),
5561 (0x000c007a, "Kbd Illum Down"),
5562 (0x000c0083, "Media Last"),
5563 (0x000c008c, "Launch Phone"),
5564 (0x000c008d, "Program Guide"),
5565 (0x000c0094, "Exit"),
5566 (0x000c009c, "Channel Up"),
5567 (0x000c009d, "Channel Down"),
5568 (0x000c00b0, "Media Play"),
5569 (0x000c00b1, "Media Pause"),
5570 (0x000c00b2, "Media Record"),
5571 (0x000c00b3, "Media Fast Forward"),
5572 (0x000c00b4, "Media Rewind"),
5573 (0x000c00b5, "Media Track Next"),
5574 (0x000c00b6, "Media Track Previous"),
5575 (0x000c00b7, "Media Stop"),
5576 (0x000c00b8, "Eject"),
5577 (0x000c00cd, "Media Play Pause"),
5578 (0x000c00cf, "Speech Input Toggle"),
5579 (0x000c00e5, "Bass Boost"),
5580 (0x000c0183, "Media Select"),
5581 (0x000c0184, "Launch Word Processor"),
5582 (0x000c0186, "Launch Spreadsheet"),
5583 (0x000c018a, "Launch Mail"),
5584 (0x000c018d, "Launch Contacts"),
5585 (0x000c018e, "Launch Calendar"),
5586 (0x000c0192, "Launch App2"),
5587 (0x000c0194, "Launch App1"),
5588 (0x000c0196, "Launch Internet Browser"),
5589 (0x000c019c, "Log Off"),
5590 (0x000c019e, "Lock Screen"),
5591 (0x000c019f, "Launch Control Panel"),
5592 (0x000c01a2, "Select Task"),
5593 (0x000c01a7, "Launch Documents"),
5594 (0x000c01ab, "Spell Check"),
5595 (0x000c01ae, "Launch Keyboard Layout"),
5596 (0x000c01b1, "Launch Screen Saver"),
5597 (0x000c01b7, "Launch Audio Browser"),
5598 (0x000c01cb, "Launch Assistant"),
5599 (0x000c0201, "New Key"),
5600 (0x000c0203, "Close"),
5601 (0x000c0207, "Save"),
5602 (0x000c0208, "Print"),
5603 (0x000c0221, "Browser Search"),
5604 (0x000c0223, "Browser Home"),
5605 (0x000c0224, "Browser Back"),
5606 (0x000c0225, "Browser Forward"),
5607 (0x000c0226, "Browser Stop"),
5608 (0x000c0227, "Browser Refresh"),
5609 (0x000c022a, "Browser Favorites"),
5610 (0x000c022d, "Zoom In"),
5611 (0x000c022e, "Zoom Out"),
5612 (0x000c0232, "Zoom Toggle"),
5613 (0x000c0279, "Redo"),
5614 (0x000c0289, "Mail Reply"),
5615 (0x000c028b, "Mail Forward"),
5616 (0x000c028c, "Mail Send"),
5617 (0x000c029d, "Keyboard Layout Select"),
5618 (0x000c029f, "Show All Windows"),
5619];
5620
5621#[cfg(test)]
5622mod tests {
5623 use std::collections::HashSet;
5624
5625 use super::{LogicalKeyboardKey, PhysicalKeyboardKey};
5626
5627 #[test]
5628 fn find_key_by_key_id_round_trips_a_sample_of_the_table() {
5629 for key in [
5630 LogicalKeyboardKey::KEY_A,
5631 LogicalKeyboardKey::DIGIT7,
5632 LogicalKeyboardKey::SPACE,
5633 LogicalKeyboardKey::ENTER,
5634 LogicalKeyboardKey::ESCAPE,
5635 LogicalKeyboardKey::ARROW_LEFT,
5636 LogicalKeyboardKey::SHIFT_RIGHT,
5637 LogicalKeyboardKey::F12,
5638 LogicalKeyboardKey::GAME_BUTTON_Z,
5639 ] {
5640 assert_eq!(
5641 LogicalKeyboardKey::find_key_by_key_id(key.key_id),
5642 Some(key)
5643 );
5644 }
5645 assert_eq!(LogicalKeyboardKey::find_key_by_key_id(0x0001), None);
5646 assert_eq!(LogicalKeyboardKey::known_logical_keys().count(), 444);
5647 }
5648
5649 #[test]
5650 fn find_key_by_code_round_trips_a_sample_of_the_table() {
5651 for key in [
5652 PhysicalKeyboardKey::KEY_A,
5653 PhysicalKeyboardKey::DIGIT7,
5654 PhysicalKeyboardKey::SPACE,
5655 PhysicalKeyboardKey::ENTER,
5656 PhysicalKeyboardKey::ESCAPE,
5657 PhysicalKeyboardKey::ARROW_LEFT,
5658 PhysicalKeyboardKey::SHIFT_RIGHT,
5659 PhysicalKeyboardKey::F12,
5660 PhysicalKeyboardKey::SHOW_ALL_WINDOWS,
5661 ] {
5662 assert_eq!(
5663 PhysicalKeyboardKey::find_key_by_code(key.usb_hid_usage),
5664 Some(key)
5665 );
5666 }
5667 assert_eq!(PhysicalKeyboardKey::find_key_by_code(0x0001), None);
5668 assert_eq!(PhysicalKeyboardKey::known_physical_keys().count(), 269);
5669 }
5670
5671 #[test]
5672 fn key_labels_come_from_unicode_then_the_table() {
5673 assert_eq!(LogicalKeyboardKey::KEY_A.key_label(), "A");
5674 assert_eq!(LogicalKeyboardKey::DIGIT7.key_label(), "7");
5675 assert_eq!(LogicalKeyboardKey::F1.key_label(), "F1");
5676 assert_eq!(LogicalKeyboardKey::SHIFT_LEFT.key_label(), "Shift Left");
5677 assert_eq!(LogicalKeyboardKey::new(0x0110000dead).key_label(), "");
5678 }
5679
5680 #[test]
5681 fn debug_names_describe_known_and_unknown_keys() {
5682 assert_eq!(
5683 LogicalKeyboardKey::KEY_A.debug_name().as_deref(),
5684 Some("Key A")
5685 );
5686 assert_eq!(
5687 LogicalKeyboardKey::new(0x0110000dead)
5688 .debug_name()
5689 .as_deref(),
5690 Some("Key with ID 0x0110000dead")
5691 );
5692 assert_eq!(
5693 PhysicalKeyboardKey::KEY_A.debug_name().as_deref(),
5694 Some("Key A")
5695 );
5696 assert_eq!(
5697 PhysicalKeyboardKey::new(0xdead).debug_name().as_deref(),
5698 Some("Key with ID 0x0000dead")
5699 );
5700 }
5701
5702 #[test]
5703 fn is_control_character_only_matches_single_control_characters() {
5704 assert!(LogicalKeyboardKey::is_control_character("\n"));
5705 assert!(LogicalKeyboardKey::is_control_character("\u{1b}"));
5706 assert!(LogicalKeyboardKey::is_control_character("\u{7f}"));
5707 assert!(!LogicalKeyboardKey::is_control_character("a"));
5708 assert!(!LogicalKeyboardKey::is_control_character(""));
5709 assert!(!LogicalKeyboardKey::is_control_character("ab"));
5710 }
5711
5712 #[test]
5713 fn synonyms_collapse_and_expand_the_sided_modifiers() {
5714 assert_eq!(
5715 LogicalKeyboardKey::SHIFT_LEFT.synonyms(),
5716 HashSet::from([LogicalKeyboardKey::SHIFT])
5717 );
5718 assert!(LogicalKeyboardKey::KEY_A.synonyms().is_empty());
5719
5720 let pressed = HashSet::from([
5721 LogicalKeyboardKey::SHIFT_RIGHT,
5722 LogicalKeyboardKey::CONTROL_LEFT,
5723 LogicalKeyboardKey::KEY_A,
5724 ]);
5725 assert_eq!(
5726 LogicalKeyboardKey::collapse_synonyms(&pressed),
5727 HashSet::from([
5728 LogicalKeyboardKey::SHIFT,
5729 LogicalKeyboardKey::CONTROL,
5730 LogicalKeyboardKey::KEY_A,
5731 ])
5732 );
5733 assert_eq!(
5734 LogicalKeyboardKey::expand_synonyms(&HashSet::from([
5735 LogicalKeyboardKey::ALT,
5736 LogicalKeyboardKey::KEY_A,
5737 ])),
5738 HashSet::from([
5739 LogicalKeyboardKey::ALT_LEFT,
5740 LogicalKeyboardKey::ALT_RIGHT,
5741 LogicalKeyboardKey::KEY_A,
5742 ])
5743 );
5744 }
5745
5746 #[test]
5747 fn autogenerated_ids_start_at_the_platform_planes() {
5748 assert!(!LogicalKeyboardKey::KEY_A.is_autogenerated());
5749 assert!(!LogicalKeyboardKey::F1.is_autogenerated());
5750 assert!(LogicalKeyboardKey::new(0x01100000001).is_autogenerated());
5751 }
5752}