1 | const MAC_ENTER = 3;
|
2 | const BACKSPACE = 8;
|
3 | const TAB = 9;
|
4 | const NUM_CENTER = 12;
|
5 | const ENTER = 13;
|
6 | const SHIFT = 16;
|
7 | const CONTROL = 17;
|
8 | const ALT = 18;
|
9 | const PAUSE = 19;
|
10 | const CAPS_LOCK = 20;
|
11 | const ESCAPE = 27;
|
12 | const SPACE = 32;
|
13 | const PAGE_UP = 33;
|
14 | const PAGE_DOWN = 34;
|
15 | const END = 35;
|
16 | const HOME = 36;
|
17 | const LEFT_ARROW = 37;
|
18 | const UP_ARROW = 38;
|
19 | const RIGHT_ARROW = 39;
|
20 | const DOWN_ARROW = 40;
|
21 | const PLUS_SIGN = 43;
|
22 | const PRINT_SCREEN = 44;
|
23 | const INSERT = 45;
|
24 | const DELETE = 46;
|
25 | const ZERO = 48;
|
26 | const ONE = 49;
|
27 | const TWO = 50;
|
28 | const THREE = 51;
|
29 | const FOUR = 52;
|
30 | const FIVE = 53;
|
31 | const SIX = 54;
|
32 | const SEVEN = 55;
|
33 | const EIGHT = 56;
|
34 | const NINE = 57;
|
35 | const FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186
|
36 | const FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187
|
37 | const QUESTION_MARK = 63;
|
38 | const AT_SIGN = 64;
|
39 | const A = 65;
|
40 | const B = 66;
|
41 | const C = 67;
|
42 | const D = 68;
|
43 | const E = 69;
|
44 | const F = 70;
|
45 | const G = 71;
|
46 | const H = 72;
|
47 | const I = 73;
|
48 | const J = 74;
|
49 | const K = 75;
|
50 | const L = 76;
|
51 | const M = 77;
|
52 | const N = 78;
|
53 | const O = 79;
|
54 | const P = 80;
|
55 | const Q = 81;
|
56 | const R = 82;
|
57 | const S = 83;
|
58 | const T = 84;
|
59 | const U = 85;
|
60 | const V = 86;
|
61 | const W = 87;
|
62 | const X = 88;
|
63 | const Y = 89;
|
64 | const Z = 90;
|
65 | const META = 91; // WIN_KEY_LEFT
|
66 | const MAC_WK_CMD_LEFT = 91;
|
67 | const MAC_WK_CMD_RIGHT = 93;
|
68 | const CONTEXT_MENU = 93;
|
69 | const NUMPAD_ZERO = 96;
|
70 | const NUMPAD_ONE = 97;
|
71 | const NUMPAD_TWO = 98;
|
72 | const NUMPAD_THREE = 99;
|
73 | const NUMPAD_FOUR = 100;
|
74 | const NUMPAD_FIVE = 101;
|
75 | const NUMPAD_SIX = 102;
|
76 | const NUMPAD_SEVEN = 103;
|
77 | const NUMPAD_EIGHT = 104;
|
78 | const NUMPAD_NINE = 105;
|
79 | const NUMPAD_MULTIPLY = 106;
|
80 | const NUMPAD_PLUS = 107;
|
81 | const NUMPAD_MINUS = 109;
|
82 | const NUMPAD_PERIOD = 110;
|
83 | const NUMPAD_DIVIDE = 111;
|
84 | const F1 = 112;
|
85 | const F2 = 113;
|
86 | const F3 = 114;
|
87 | const F4 = 115;
|
88 | const F5 = 116;
|
89 | const F6 = 117;
|
90 | const F7 = 118;
|
91 | const F8 = 119;
|
92 | const F9 = 120;
|
93 | const F10 = 121;
|
94 | const F11 = 122;
|
95 | const F12 = 123;
|
96 | const NUM_LOCK = 144;
|
97 | const SCROLL_LOCK = 145;
|
98 | const FIRST_MEDIA = 166;
|
99 | const FF_MINUS = 173;
|
100 | const MUTE = 173; // Firefox (Gecko) fires 181 for MUTE
|
101 | const VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN
|
102 | const VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP
|
103 | const FF_MUTE = 181;
|
104 | const FF_VOLUME_DOWN = 182;
|
105 | const LAST_MEDIA = 183;
|
106 | const FF_VOLUME_UP = 183;
|
107 | const SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON
|
108 | const EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS
|
109 | const COMMA = 188;
|
110 | const DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS
|
111 | const PERIOD = 190;
|
112 | const SLASH = 191;
|
113 | const APOSTROPHE = 192;
|
114 | const TILDE = 192;
|
115 | const OPEN_SQUARE_BRACKET = 219;
|
116 | const BACKSLASH = 220;
|
117 | const CLOSE_SQUARE_BRACKET = 221;
|
118 | const SINGLE_QUOTE = 222;
|
119 | const MAC_META = 224;
|
120 |
|
121 | /**
|
122 | * Checks whether a modifier key is pressed.
|
123 | * @param event Event to be checked.
|
124 | */
|
125 | function hasModifierKey(event, ...modifiers) {
|
126 | if (modifiers.length) {
|
127 | return modifiers.some(modifier => event[modifier]);
|
128 | }
|
129 | return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey;
|
130 | }
|
131 |
|
132 | /**
|
133 | * Generated bundle index. Do not edit.
|
134 | */
|
135 |
|
136 | export { A, ALT, APOSTROPHE, AT_SIGN, B, BACKSLASH, BACKSPACE, C, CAPS_LOCK, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, D, DASH, DELETE, DOWN_ARROW, E, EIGHT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FOUR, G, H, HOME, I, INSERT, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, META, MUTE, N, NINE, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PAUSE, PERIOD, PLUS_SIGN, PRINT_SCREEN, Q, QUESTION_MARK, R, RIGHT_ARROW, S, SCROLL_LOCK, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, T, TAB, THREE, TILDE, TWO, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, W, X, Y, Z, ZERO, hasModifierKey };
|
137 | //# sourceMappingURL=keycodes.mjs.map
|