uievents_code/
lib.rs

1#![doc=include_str!("../README.md")]
2#![cfg_attr(doc_cfg, feature(doc_cfg))]
3
4#[cfg(any(feature = "enum", doc))]
5use strum_macros::{FromRepr, EnumCount};
6
7/// Writing System Keys as defined in
8/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-alphanumeric-writing-system>.
9pub mod writing_system {
10    pub const BACKQUOTE: &'static str = "Backquote";
11    pub const BACKSLASH: &'static str = "Backslash";
12    pub const BACKSPACE: &'static str = "Backspace";
13    pub const BRACKET_LEFT: &'static str = "BracketLeft";
14    pub const BRACKET_RIGHT: &'static str = "BracketRight";
15    pub const COMMA: &'static str = "Comma";
16    pub const DIGIT0: &'static str = "Digit0";
17    pub const DIGIT1: &'static str = "Digit1";
18    pub const DIGIT2: &'static str = "Digit2";
19    pub const DIGIT3: &'static str = "Digit3";
20    pub const DIGIT4: &'static str = "Digit4";
21    pub const DIGIT5: &'static str = "Digit5";
22    pub const DIGIT6: &'static str = "Digit6";
23    pub const DIGIT7: &'static str = "Digit7";
24    pub const DIGIT8: &'static str = "Digit8";
25    pub const DIGIT9: &'static str = "Digit9";
26    pub const EQUAL: &'static str = "Equal";
27    pub const INTL_BACKSLASH: &'static str = "IntlBackslash";
28    pub const INTL_RO: &'static str = "IntlRo";
29    pub const INTL_YEN: &'static str = "IntlYen";
30    pub const KEY_A: &'static str = "KeyA";
31    pub const KEY_B: &'static str = "KeyB";
32    pub const KEY_C: &'static str = "KeyC";
33    pub const KEY_D: &'static str = "KeyD";
34    pub const KEY_E: &'static str = "KeyE";
35    pub const KEY_F: &'static str = "KeyF";
36    pub const KEY_G: &'static str = "KeyG";
37    pub const KEY_H: &'static str = "KeyH";
38    pub const KEY_I: &'static str = "KeyI";
39    pub const KEY_J: &'static str = "KeyJ";
40    pub const KEY_K: &'static str = "KeyK";
41    pub const KEY_L: &'static str = "KeyL";
42    pub const KEY_M: &'static str = "KeyM";
43    pub const KEY_N: &'static str = "KeyN";
44    pub const KEY_O: &'static str = "KeyO";
45    pub const KEY_P: &'static str = "KeyP";
46    pub const KEY_Q: &'static str = "KeyQ";
47    pub const KEY_R: &'static str = "KeyR";
48    pub const KEY_S: &'static str = "KeyS";
49    pub const KEY_T: &'static str = "KeyT";
50    pub const KEY_U: &'static str = "KeyU";
51    pub const KEY_V: &'static str = "KeyV";
52    pub const KEY_W: &'static str = "KeyW";
53    pub const KEY_X: &'static str = "KeyX";
54    pub const KEY_Y: &'static str = "KeyY";
55    pub const KEY_Z: &'static str = "KeyZ";
56    pub const MINUS: &'static str = "Minus";
57    pub const PERIOD: &'static str = "Period";
58    pub const QUOTE: &'static str = "Quote";
59    pub const SEMICOLON: &'static str = "Semicolon";
60    pub const SLASH: &'static str = "Slash";
61}
62pub use writing_system::*;
63
64/// Functional Keys as defined in
65/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-alphanumeric-functional>.
66pub mod functional {
67    pub mod alphanumeric {
68        pub const ALT_LEFT: &'static str = "AltLeft";
69        pub const ALT_RIGHT: &'static str = "AltRight";
70        pub const CAPS_LOCK: &'static str = "CapsLock";
71        pub const CONTEXT_MENU: &'static str = "ContextMenu";
72        pub const CONTROL_LEFT: &'static str = "ControlLeft";
73        pub const CONTROL_RIGHT: &'static str = "ControlRight";
74        pub const ENTER: &'static str = "Enter";
75        pub const META_LEFT: &'static str = "MetaLeft";
76        pub const META_RIGHT: &'static str = "MetaRight";
77        pub const SHIFT_LEFT: &'static str = "ShiftLeft";
78        pub const SHIFT_RIGHT: &'static str = "ShiftRight";
79        pub const SPACE: &'static str = "Space";
80        pub const TAB: &'static str = "Tab";
81    }
82    pub use alphanumeric::*;
83
84    pub mod japanese_and_korean {
85        pub const CONVERT: &'static str = "Convert";
86        pub const KANA_MODE: &'static str = "KanaMode";
87        pub const LANG1: &'static str = "Lang1";
88        pub const LANG2: &'static str = "Lang2";
89        pub const LANG3: &'static str = "Lang3";
90        pub const LANG4: &'static str = "Lang4";
91        pub const LANG5: &'static str = "Lang5";
92        pub const NON_CONVERT: &'static str = "NonConvert";
93    }
94    pub use japanese_and_korean::*;
95}
96pub use functional::*;
97
98/// Control Pad Keys as defined in
99/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-controlpad-section>.
100pub mod control_pad {
101    pub const DELETE: &'static str = "Delete";
102    pub const END: &'static str = "End";
103    pub const HELP: &'static str = "Help";
104    pub const HOME: &'static str = "Home";
105    pub const INSERT: &'static str = "Insert";
106    pub const PAGE_DOWN: &'static str = "PageDown";
107    pub const PAGE_UP: &'static str = "PageUp";
108}
109pub use self::control_pad::*;
110
111/// Arrow Pad Keys as defined in
112/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-arrowpad-section>
113pub mod arrow_pad {
114    pub const ARROW_DOWN: &'static str = "ArrowDown";
115    pub const ARROW_LEFT: &'static str = "ArrowLeft";
116    pub const ARROW_RIGHT: &'static str = "ArrowRight";
117    pub const ARROW_UP: &'static str = "ArrowUp";
118}
119pub use self::arrow_pad::*;
120
121/// Numpad Keys as defined in
122/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-numpad-section>
123pub mod numpad {
124    pub const NUM_LOCK: &'static str = "NumLock";
125    pub const NUMPAD0: &'static str = "Numpad0";
126    pub const NUMPAD1: &'static str = "Numpad1";
127    pub const NUMPAD2: &'static str = "Numpad2";
128    pub const NUMPAD3: &'static str = "Numpad3";
129    pub const NUMPAD4: &'static str = "Numpad4";
130    pub const NUMPAD5: &'static str = "Numpad5";
131    pub const NUMPAD6: &'static str = "Numpad6";
132    pub const NUMPAD7: &'static str = "Numpad7";
133    pub const NUMPAD8: &'static str = "Numpad8";
134    pub const NUMPAD9: &'static str = "Numpad9";
135    pub const NUMPAD_ADD: &'static str = "NumpadAdd";
136    pub const NUMPAD_BACKSPACE: &'static str = "NumpadBackspace";
137    pub const NUMPAD_CLEAR: &'static str = "NumpadClear";
138    pub const NUMPAD_CLEAR_ENTRY: &'static str = "NumpadClearEntry";
139    pub const NUMPAD_COMMA: &'static str = "NumpadComma";
140    pub const NUMPAD_DECIMAL: &'static str = "NumpadDecimal";
141    pub const NUMPAD_DIVIDE: &'static str = "NumpadDivide";
142    pub const NUMPAD_ENTER: &'static str = "NumpadEnter";
143    pub const NUMPAD_EQUAL: &'static str = "NumpadEqual";
144    pub const NUMPAD_HASH: &'static str = "NumpadHash";
145    pub const NUMPAD_MEMORY_ADD: &'static str = "NumpadMemoryAdd";
146    pub const NUMPAD_MEMORY_CLEAR: &'static str = "NumpadMemoryClear";
147    pub const NUMPAD_MEMORY_RECALL: &'static str = "NumpadMemoryRecall";
148    pub const NUMPAD_MEMORY_STORE: &'static str = "NumpadMemoryStore";
149    pub const NUMPAD_MEMORY_SUBTRACT: &'static str = "NumpadMemorySubtract";
150    pub const NUMPAD_MULTIPLY: &'static str = "NumpadMultiply";
151    pub const NUMPAD_PAREN_LEFT: &'static str = "NumpadParenLeft";
152    pub const NUMPAD_PAREN_RIGHT: &'static str = "NumpadParenRight";
153    pub const NUMPAD_STAR: &'static str = "NumpadStar";
154    pub const NUMPAD_SUBTRACT: &'static str = "NumpadSubtract";
155}
156pub use self::numpad::*;
157
158/// Function Keys as defined in
159/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-function-section>
160pub mod function {
161    pub const ESCAPE: &'static str = "Escape";
162    pub const F1: &'static str = "F1";
163    pub const F2: &'static str = "F2";
164    pub const F3: &'static str = "F3";
165    pub const F4: &'static str = "F4";
166    pub const F5: &'static str = "F5";
167    pub const F6: &'static str = "F6";
168    pub const F7: &'static str = "F7";
169    pub const F8: &'static str = "F8";
170    pub const F9: &'static str = "F9";
171    pub const F10: &'static str = "F10";
172    pub const F11: &'static str = "F11";
173    pub const F12: &'static str = "F12";
174    pub const F13: &'static str = "F13";
175    pub const F14: &'static str = "F14";
176    pub const F15: &'static str = "F15";
177    pub const F16: &'static str = "F16";
178    pub const F17: &'static str = "F17";
179    pub const F18: &'static str = "F18";
180    pub const F19: &'static str = "F19";
181    pub const FN: &'static str = "Fn";
182    pub const FN_LOCK: &'static str = "FnLock";
183    pub const PRINT_SCREEN: &'static str = "PrintScreen";
184    pub const SCROLL_LOCK: &'static str = "ScrollLock";
185    pub const PAUSE: &'static str = "Pause";
186}
187pub use self::function::*;
188
189/// Media Keys as defined in
190/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-media>.
191pub mod media {
192    pub const BROWSER_BACK: &'static str = "BrowserBack";
193    pub const BROWSER_FAVORITES: &'static str = "BrowserFavorites";
194    pub const BROWSER_FORWARD: &'static str = "BrowserForward";
195    pub const BROWSER_HOME: &'static str = "BrowserHome";
196    pub const BROWSER_REFRESH: &'static str = "BrowserRefresh";
197    pub const BROWSER_SEARCH: &'static str = "BrowserSearch";
198    pub const BROWSER_STOP: &'static str = "BrowserStop";
199    pub const EJECT: &'static str = "Eject";
200    pub const LAUNCH_APP1: &'static str = "LaunchApp1";
201    pub const LAUNCH_APP2: &'static str = "LaunchApp2";
202    pub const LAUNCH_MAIL: &'static str = "LaunchMail";
203    pub const MEDIA_PLAY_PAUSE: &'static str = "MediaPlayPause";
204    pub const MEDIA_SELECT: &'static str = "MediaSelect";
205    pub const MEDIA_STOP: &'static str = "MediaStop";
206    pub const MEDIA_TRACK_NEXT: &'static str = "MediaTrackNext";
207    pub const MEDIA_TRACK_PREVIOUS: &'static str = "MediaTrackPrevious";
208    pub const POWER: &'static str = "Power";
209    pub const SLEEP: &'static str = "Sleep";
210    pub const AUDIO_VOLUME_DOWN: &'static str = "AudioVolumeDown";
211    pub const AUDIO_VOLUME_MUTE: &'static str = "AudioVolumeMute";
212    pub const AUDIO_VOLUME_UP: &'static str = "AudioVolumeUp";
213    pub const WAKE_UP: &'static str = "WakeUp";
214}
215pub use self::media::*;
216
217/// Legacy Keys as defined in
218/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-legacy>.
219#[cfg(any(feature = "legacy", doc))]
220#[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
221pub mod legacy {
222    pub const HYPER: &'static str = "Hyper";
223    pub const SUPER: &'static str = "Super";
224    pub const TURBO: &'static str = "Turbo";
225    pub const ABORT: &'static str = "Abort";
226    pub const RESUME: &'static str = "Resume";
227    pub const SUSPEND: &'static str = "Suspend";
228    pub const AGAIN: &'static str = "Again";
229    pub const COPY: &'static str = "Copy";
230    pub const CUT: &'static str = "Cut";
231    pub const FIND: &'static str = "Find";
232    pub const OPEN: &'static str = "Open";
233    pub const PASTE: &'static str = "Paste";
234    pub const PROPS: &'static str = "Props";
235    pub const SELECT: &'static str = "Select";
236    pub const UNDO: &'static str = "Undo";
237}
238#[cfg(any(feature = "legacy", doc))]
239#[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
240pub use self::legacy::*;
241
242/// Non-Standard International Keys as defined in
243/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-legacy>
244#[cfg(any(feature = "non_standard_intl", doc))]
245#[cfg_attr(doc_cfg, doc(cfg(feature = "non_standard_intl")))]
246pub mod non_standard_intl {
247    pub const HIRAGANA: &'static str = "Hiragana";
248    pub const KATAKANA: &'static str = "Katakana";
249}
250#[cfg(any(feature = "non_standard_intl", doc))]
251#[cfg_attr(doc_cfg, doc(cfg(feature = "non_standard_intl")))]
252pub use self::non_standard_intl::*;
253
254/// Special Keys as defined in
255/// <https://www.w3.org/TR/2017/CR-uievents-code-20170601/#key-legacy>.
256/// Currently, only the `Unidentified` key is defined.
257pub mod special {
258    pub const UNIDENTIFIED: &'static str = "Unidentified";
259}
260pub use self::special::*;
261
262/// Enum with various [`KeyboardEvent.code`] values
263/// as per the latest the latest (as of 11 February, 2023) [W3C Candidate Recommendation, 01 June 2017].
264///
265/// [`KeyboardEvent.code`]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code
266/// [W3C Candidate Recommendation, 01 June 2017]: https://www.w3.org/TR/2017/CR-uievents-code-20170601/#code-value-tables
267#[cfg(any(feature = "enum", doc))]
268#[cfg_attr(doc_cfg, doc(cfg(feature = "enum")))]
269#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, EnumCount, FromRepr)]
270#[repr(u8)]
271pub enum KeyboardEventCode {
272    /// Corresponds to [BACKQUOTE][crate::BACKQUOTE].
273    Backquote,
274    /// Corresponds to [BACKSLASH][crate::BACKSLASH].
275    Backslash,
276    /// Corresponds to [BACKSPACE][crate::BACKSPACE].
277    Backspace,
278    /// Corresponds to [BRACKET_LEFT][crate::BRACKET_LEFT].
279    BracketLeft,
280    /// Corresponds to [BRACKET_RIGHT][crate::BRACKET_RIGHT].
281    BracketRight,
282    /// Corresponds to [COMMA][crate::COMMA].
283    Comma,
284    /// Corresponds to [DIGIT0][crate::DIGIT0].
285    Digit0,
286    /// Corresponds to [DIGIT1][crate::DIGIT1].
287    Digit1,
288    /// Corresponds to [DIGIT2][crate::DIGIT2].
289    Digit2,
290    /// Corresponds to [DIGIT3][crate::DIGIT3].
291    Digit3,
292    /// Corresponds to [DIGIT4][crate::DIGIT4].
293    Digit4,
294    /// Corresponds to [DIGIT5][crate::DIGIT5].
295    Digit5,
296    /// Corresponds to [DIGIT6][crate::DIGIT6].
297    Digit6,
298    /// Corresponds to [DIGIT7][crate::DIGIT7].
299    Digit7,
300    /// Corresponds to [DIGIT8][crate::DIGIT8].
301    Digit8,
302    /// Corresponds to [DIGIT9][crate::DIGIT9].
303    Digit9,
304    /// Corresponds to [EQUAL][crate::EQUAL].
305    Equal,
306    /// Corresponds to [INTL_BACKSLASH][crate::INTL_BACKSLASH].
307    IntlBackslash,
308    /// Corresponds to [INTL_RO][crate::INTL_RO].
309    IntlRo,
310    /// Corresponds to [INTL_YEN][crate::INTL_YEN].
311    IntlYen,
312    /// Corresponds to [KEY_A][crate::KEY_A].
313    KeyA,
314    /// Corresponds to [KEY_B][crate::KEY_B].
315    KeyB,
316    /// Corresponds to [KEY_C][crate::KEY_C].
317    KeyC,
318    /// Corresponds to [KEY_D][crate::KEY_D].
319    KeyD,
320    /// Corresponds to [KEY_E][crate::KEY_E].
321    KeyE,
322    /// Corresponds to [KEY_F][crate::KEY_F].
323    KeyF,
324    /// Corresponds to [KEY_G][crate::KEY_G].
325    KeyG,
326    /// Corresponds to [KEY_H][crate::KEY_H].
327    KeyH,
328    /// Corresponds to [KEY_I][crate::KEY_I].
329    KeyI,
330    /// Corresponds to [KEY_J][crate::KEY_J].
331    KeyJ,
332    /// Corresponds to [KEY_K][crate::KEY_K].
333    KeyK,
334    /// Corresponds to [KEY_L][crate::KEY_L].
335    KeyL,
336    /// Corresponds to [KEY_M][crate::KEY_M].
337    KeyM,
338    /// Corresponds to [KEY_N][crate::KEY_N].
339    KeyN,
340    /// Corresponds to [KEY_O][crate::KEY_O].
341    KeyO,
342    /// Corresponds to [KEY_P][crate::KEY_P].
343    KeyP,
344    /// Corresponds to [KEY_Q][crate::KEY_Q].
345    KeyQ,
346    /// Corresponds to [KEY_R][crate::KEY_R].
347    KeyR,
348    /// Corresponds to [KEY_S][crate::KEY_S].
349    KeyS,
350    /// Corresponds to [KEY_T][crate::KEY_T].
351    KeyT,
352    /// Corresponds to [KEY_U][crate::KEY_U].
353    KeyU,
354    /// Corresponds to [KEY_V][crate::KEY_V].
355    KeyV,
356    /// Corresponds to [KEY_W][crate::KEY_W].
357    KeyW,
358    /// Corresponds to [KEY_X][crate::KEY_X].
359    KeyX,
360    /// Corresponds to [KEY_Y][crate::KEY_Y].
361    KeyY,
362    /// Corresponds to [KEY_Z][crate::KEY_Z].
363    KeyZ,
364    /// Corresponds to [MINUS][crate::MINUS].
365    Minus,
366    /// Corresponds to [PERIOD][crate::PERIOD].
367    Period,
368    /// Corresponds to [QUOTE][crate::QUOTE].
369    Quote,
370    /// Corresponds to [SEMICOLON][crate::SEMICOLON].
371    Semicolon,
372    /// Corresponds to [SLASH][crate::SLASH].
373    Slash,
374    /// Corresponds to [ALT_LEFT][crate::ALT_LEFT].
375    AltLeft,
376    /// Corresponds to [ALT_RIGHT][crate::ALT_RIGHT].
377    AltRight,
378    /// Corresponds to [CAPS_LOCK][crate::CAPS_LOCK].
379    CapsLock,
380    /// Corresponds to [CONTEXT_MENU][crate::CONTEXT_MENU].
381    ContextMenu,
382    /// Corresponds to [CONTROL_LEFT][crate::CONTROL_LEFT].
383    ControlLeft,
384    /// Corresponds to [CONTROL_RIGHT][crate::CONTROL_RIGHT].
385    ControlRight,
386    /// Corresponds to [ENTER][crate::ENTER].
387    Enter,
388    /// Corresponds to [META_LEFT][crate::META_LEFT].
389    MetaLeft,
390    /// Corresponds to [META_RIGHT][crate::META_RIGHT].
391    MetaRight,
392    /// Corresponds to [SHIFT_LEFT][crate::SHIFT_LEFT].
393    ShiftLeft,
394    /// Corresponds to [SHIFT_RIGHT][crate::SHIFT_RIGHT].
395    ShiftRight,
396    /// Corresponds to [SPACE][crate::SPACE].
397    Space,
398    /// Corresponds to [TAB][crate::TAB].
399    Tab,
400    /// Corresponds to [CONVERT][crate::CONVERT].
401    Convert,
402    /// Corresponds to [KANA_MODE][crate::KANA_MODE].
403    KanaMode,
404    /// Corresponds to [LANG1][crate::LANG1].
405    Lang1,
406    /// Corresponds to [LANG2][crate::LANG2].
407    Lang2,
408    /// Corresponds to [LANG3][crate::LANG3].
409    Lang3,
410    /// Corresponds to [LANG4][crate::LANG4].
411    Lang4,
412    /// Corresponds to [LANG5][crate::LANG5].
413    Lang5,
414    /// Corresponds to [NON_CONVERT][crate::NON_CONVERT].
415    NonConvert,
416    /// Corresponds to [DELETE][crate::DELETE].
417    Delete,
418    /// Corresponds to [END][crate::END].
419    End,
420    /// Corresponds to [HELP][crate::HELP].
421    Help,
422    /// Corresponds to [HOME][crate::HOME].
423    Home,
424    /// Corresponds to [INSERT][crate::INSERT].
425    Insert,
426    /// Corresponds to [PAGE_DOWN][crate::PAGE_DOWN].
427    PageDown,
428    /// Corresponds to [PAGE_UP][crate::PAGE_UP].
429    PageUp,
430    /// Corresponds to [ARROW_DOWN][crate::ARROW_DOWN].
431    ArrowDown,
432    /// Corresponds to [ARROW_LEFT][crate::ARROW_LEFT].
433    ArrowLeft,
434    /// Corresponds to [ARROW_RIGHT][crate::ARROW_RIGHT].
435    ArrowRight,
436    /// Corresponds to [ARROW_UP][crate::ARROW_UP].
437    ArrowUp,
438    /// Corresponds to [NUM_LOCK][crate::NUM_LOCK].
439    NumLock,
440    /// Corresponds to [NUMPAD0][crate::NUMPAD0].
441    Numpad0,
442    /// Corresponds to [NUMPAD1][crate::NUMPAD1].
443    Numpad1,
444    /// Corresponds to [NUMPAD2][crate::NUMPAD2].
445    Numpad2,
446    /// Corresponds to [NUMPAD3][crate::NUMPAD3].
447    Numpad3,
448    /// Corresponds to [NUMPAD4][crate::NUMPAD4].
449    Numpad4,
450    /// Corresponds to [NUMPAD5][crate::NUMPAD5].
451    Numpad5,
452    /// Corresponds to [NUMPAD6][crate::NUMPAD6].
453    Numpad6,
454    /// Corresponds to [NUMPAD7][crate::NUMPAD7].
455    Numpad7,
456    /// Corresponds to [NUMPAD8][crate::NUMPAD8].
457    Numpad8,
458    /// Corresponds to [NUMPAD9][crate::NUMPAD9].
459    Numpad9,
460    /// Corresponds to [NUMPAD_ADD][crate::NUMPAD_ADD].
461    NumpadAdd,
462    /// Corresponds to [NUMPAD_BACKSPACE][crate::NUMPAD_BACKSPACE].
463    NumpadBackspace,
464    /// Corresponds to [NUMPAD_CLEAR][crate::NUMPAD_CLEAR].
465    NumpadClear,
466    /// Corresponds to [NUMPAD_CLEAR_ENTRY][crate::NUMPAD_CLEAR_ENTRY].
467    NumpadClearEntry,
468    /// Corresponds to [NUMPAD_COMMA][crate::NUMPAD_COMMA].
469    NumpadComma,
470    /// Corresponds to [NUMPAD_DECIMAL][crate::NUMPAD_DECIMAL].
471    NumpadDecimal,
472    /// Corresponds to [NUMPAD_DIVIDE][crate::NUMPAD_DIVIDE].
473    NumpadDivide,
474    /// Corresponds to [NUMPAD_ENTER][crate::NUMPAD_ENTER].
475    NumpadEnter,
476    /// Corresponds to [NUMPAD_EQUAL][crate::NUMPAD_EQUAL].
477    NumpadEqual,
478    /// Corresponds to [NUMPAD_HASH][crate::NUMPAD_HASH].
479    NumpadHash,
480    /// Corresponds to [NUMPAD_MEMORY_ADD][crate::NUMPAD_MEMORY_ADD].
481    NumpadMemoryAdd,
482    /// Corresponds to [NUMPAD_MEMORY_CLEAR][crate::NUMPAD_MEMORY_CLEAR].
483    NumpadMemoryClear,
484    /// Corresponds to [NUMPAD_MEMORY_RECALL][crate::NUMPAD_MEMORY_RECALL].
485    NumpadMemoryRecall,
486    /// Corresponds to [NUMPAD_MEMORY_STORE][crate::NUMPAD_MEMORY_STORE].
487    NumpadMemoryStore,
488    /// Corresponds to [NUMPAD_MEMORY_SUBTRACT][crate::NUMPAD_MEMORY_SUBTRACT].
489    NumpadMemorySubtract,
490    /// Corresponds to [NUMPAD_MULTIPLY][crate::NUMPAD_MULTIPLY].
491    NumpadMultiply,
492    /// Corresponds to [NUMPAD_PAREN_LEFT][crate::NUMPAD_PAREN_LEFT].
493    NumpadParenLeft,
494    /// Corresponds to [NUMPAD_PAREN_RIGHT][crate::NUMPAD_PAREN_RIGHT].
495    NumpadParenRight,
496    /// Corresponds to [NUMPAD_STAR][crate::NUMPAD_STAR].
497    NumpadStar,
498    /// Corresponds to [NUMPAD_SUBTRACT][crate::NUMPAD_SUBTRACT].
499    NumpadSubtract,
500    /// Corresponds to [ESCAPE][crate::ESCAPE].
501    Escape,
502    /// Corresponds to [F1][crate::F1].
503    F1,
504    /// Corresponds to [F2][crate::F2].
505    F2,
506    /// Corresponds to [F3][crate::F3].
507    F3,
508    /// Corresponds to [F4][crate::F4].
509    F4,
510    /// Corresponds to [F5][crate::F5].
511    F5,
512    /// Corresponds to [F6][crate::F6].
513    F6,
514    /// Corresponds to [F7][crate::F7].
515    F7,
516    /// Corresponds to [F8][crate::F8].
517    F8,
518    /// Corresponds to [F9][crate::F9].
519    F9,
520    /// Corresponds to [F10][crate::F10].
521    F10,
522    /// Corresponds to [F11][crate::F11].
523    F11,
524    /// Corresponds to [F12][crate::F12].
525    F12,
526    /// Corresponds to [F13][crate::F13].
527    F13,
528    /// Corresponds to [F14][crate::F14].
529    F14,
530    /// Corresponds to [F15][crate::F15].
531    F15,
532    /// Corresponds to [F16][crate::F16].
533    F16,
534    /// Corresponds to [F17][crate::F17].
535    F17,
536    /// Corresponds to [F18][crate::F18].
537    F18,
538    /// Corresponds to [F19][crate::F19].
539    F19,
540    /// Corresponds to [FN][crate::FN].
541    Fn,
542    /// Corresponds to [FN_LOCK][crate::FN_LOCK].
543    FnLock,
544    /// Corresponds to [PRINT_SCREEN][crate::PRINT_SCREEN].
545    PrintScreen,
546    /// Corresponds to [SCROLL_LOCK][crate::SCROLL_LOCK].
547    ScrollLock,
548    /// Corresponds to [PAUSE][crate::PAUSE].
549    Pause,
550    /// Corresponds to [BROWSER_BACK][crate::BROWSER_BACK].
551    BrowserBack,
552    /// Corresponds to [BROWSER_FAVORITES][crate::BROWSER_FAVORITES].
553    BrowserFavorites,
554    /// Corresponds to [BROWSER_FORWARD][crate::BROWSER_FORWARD].
555    BrowserForward,
556    /// Corresponds to [BROWSER_HOME][crate::BROWSER_HOME].
557    BrowserHome,
558    /// Corresponds to [BROWSER_REFRESH][crate::BROWSER_REFRESH].
559    BrowserRefresh,
560    /// Corresponds to [BROWSER_SEARCH][crate::BROWSER_SEARCH].
561    BrowserSearch,
562    /// Corresponds to [BROWSER_STOP][crate::BROWSER_STOP].
563    BrowserStop,
564    /// Corresponds to [EJECT][crate::EJECT].
565    Eject,
566    /// Corresponds to [LAUNCH_APP1][crate::LAUNCH_APP1].
567    LaunchApp1,
568    /// Corresponds to [LAUNCH_APP2][crate::LAUNCH_APP2].
569    LaunchApp2,
570    /// Corresponds to [LAUNCH_MAIL][crate::LAUNCH_MAIL].
571    LaunchMail,
572    /// Corresponds to [MEDIA_PLAY_PAUSE][crate::MEDIA_PLAY_PAUSE].
573    MediaPlayPause,
574    /// Corresponds to [MEDIA_SELECT][crate::MEDIA_SELECT].
575    MediaSelect,
576    /// Corresponds to [MEDIA_STOP][crate::MEDIA_STOP].
577    MediaStop,
578    /// Corresponds to [MEDIA_TRACK_NEXT][crate::MEDIA_TRACK_NEXT].
579    MediaTrackNext,
580    /// Corresponds to [MEDIA_TRACK_PREVIOUS][crate::MEDIA_TRACK_PREVIOUS].
581    MediaTrackPrevious,
582    /// Corresponds to [POWER][crate::POWER].
583    Power,
584    /// Corresponds to [SLEEP][crate::SLEEP].
585    Sleep,
586    /// Corresponds to [AUDIO_VOLUME_DOWN][crate::AUDIO_VOLUME_DOWN].
587    AudioVolumeDown,
588    /// Corresponds to [AUDIO_VOLUME_MUTE][crate::AUDIO_VOLUME_MUTE].
589    AudioVolumeMute,
590    /// Corresponds to [AUDIO_VOLUME_UP][crate::AUDIO_VOLUME_UP].
591    AudioVolumeUp,
592    /// Corresponds to [WAKE_UP][crate::WAKE_UP].
593    WakeUp,
594    #[cfg(any(feature = "legacy", doc))]
595    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
596    /// Corresponds to [HYPER][crate::HYPER].
597    Hyper,
598    #[cfg(any(feature = "legacy", doc))]
599    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
600    /// Corresponds to [SUPER][crate::SUPER].
601    Super,
602    #[cfg(any(feature = "legacy", doc))]
603    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
604    /// Corresponds to [TURBO][crate::TURBO].
605    Turbo,
606    #[cfg(any(feature = "legacy", doc))]
607    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
608    /// Corresponds to [ABORT][crate::ABORT].
609    Abort,
610    #[cfg(any(feature = "legacy", doc))]
611    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
612    /// Corresponds to [RESUME][crate::RESUME].
613    Resume,
614    #[cfg(any(feature = "legacy", doc))]
615    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
616    /// Corresponds to [SUSPEND][crate::SUSPEND].
617    Suspend,
618    #[cfg(any(feature = "legacy", doc))]
619    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
620    /// Corresponds to [AGAIN][crate::AGAIN].
621    Again,
622    #[cfg(any(feature = "legacy", doc))]
623    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
624    /// Corresponds to [COPY][crate::COPY].
625    Copy,
626    #[cfg(any(feature = "legacy", doc))]
627    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
628    /// Corresponds to [CUT][crate::CUT].
629    Cut,
630    #[cfg(any(feature = "legacy", doc))]
631    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
632    /// Corresponds to [FIND][crate::FIND].
633    Find,
634    #[cfg(any(feature = "legacy", doc))]
635    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
636    /// Corresponds to [OPEN][crate::OPEN].
637    Open,
638    #[cfg(any(feature = "legacy", doc))]
639    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
640    /// Corresponds to [PASTE][crate::PASTE].
641    Paste,
642    #[cfg(any(feature = "legacy", doc))]
643    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
644    /// Corresponds to [PROPS][crate::PROPS].
645    Props,
646    #[cfg(any(feature = "legacy", doc))]
647    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
648    /// Corresponds to [SELECT][crate::SELECT].
649    Select,
650    #[cfg(any(feature = "legacy", doc))]
651    #[cfg_attr(doc_cfg, doc(cfg(feature = "legacy")))]
652    /// Corresponds to [UNDO][crate::UNDO].
653    Undo,
654    #[cfg(any(feature = "non_standard_intl", doc))]
655    #[cfg_attr(doc_cfg, doc(cfg(feature = "non_standard_intl")))]
656    /// Corresponds to [HIRAGANA][crate::HIRAGANA].
657    Hiragana,
658    #[cfg(any(feature = "non_standard_intl", doc))]
659    #[cfg_attr(doc_cfg, doc(cfg(feature = "non_standard_intl")))]
660    /// Corresponds to [KATAKANA][crate::KATAKANA].
661    Katakana,
662    /// Corresponds to [UNIDENTIFIED][crate::UNIDENTIFIED].
663    Unidentified,
664}