@tanstack/hotkeys 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/dist/{manager.utils.js → _event-target.js} +2 -41
- package/dist/_keyboard-event.js +75 -0
- package/dist/_match.js +48 -0
- package/dist/_named-keys.d.ts +6 -0
- package/dist/_named-keys.js +65 -0
- package/dist/_recorder-chord.js +42 -0
- package/dist/_recording-guard.js +55 -0
- package/dist/_registration.js +49 -0
- package/dist/conflicts.d.ts +36 -0
- package/dist/conflicts.js +54 -0
- package/dist/constants.d.ts +16 -144
- package/dist/constants.js +55 -172
- package/dist/display-labels.d.ts +90 -0
- package/dist/display-labels.js +112 -0
- package/dist/format.d.ts +48 -12
- package/dist/format.js +35 -39
- package/dist/hint.d.ts +20 -0
- package/dist/hint.js +23 -0
- package/dist/hotkey-manager.d.ts +14 -12
- package/dist/hotkey-manager.js +70 -21
- package/dist/hotkey-recorder.d.ts +8 -8
- package/dist/hotkey-recorder.js +74 -15
- package/dist/hotkey-sequence-recorder.d.ts +13 -9
- package/dist/hotkey-sequence-recorder.js +90 -28
- package/dist/{hotkey.d.ts → hotkey.types.d.ts} +58 -126
- package/dist/index.d.ts +14 -9
- package/dist/index.js +10 -6
- package/dist/key-state-tracker.d.ts +4 -7
- package/dist/key-state-tracker.js +30 -27
- package/dist/key.types.d.ts +79 -0
- package/dist/match.d.ts +24 -11
- package/dist/match.js +19 -30
- package/dist/parse.d.ts +18 -15
- package/dist/parse.js +39 -22
- package/dist/platform.d.ts +41 -0
- package/dist/platform.js +52 -0
- package/dist/recorder-options.d.ts +31 -0
- package/dist/sequence-manager.d.ts +27 -15
- package/dist/sequence-manager.js +61 -30
- package/dist/validate.d.ts +16 -8
- package/dist/validate.js +8 -13
- package/package.json +8 -13
- package/dist/constants.cjs +0 -535
- package/dist/constants.cjs.map +0 -1
- package/dist/constants.d.cts +0 -290
- package/dist/constants.js.map +0 -1
- package/dist/format.cjs +0 -91
- package/dist/format.cjs.map +0 -1
- package/dist/format.d.cts +0 -60
- package/dist/format.js.map +0 -1
- package/dist/hotkey-manager.cjs +0 -383
- package/dist/hotkey-manager.cjs.map +0 -1
- package/dist/hotkey-manager.d.cts +0 -230
- package/dist/hotkey-manager.js.map +0 -1
- package/dist/hotkey-recorder.cjs +0 -179
- package/dist/hotkey-recorder.cjs.map +0 -1
- package/dist/hotkey-recorder.d.cts +0 -116
- package/dist/hotkey-recorder.js.map +0 -1
- package/dist/hotkey-sequence-recorder.cjs +0 -192
- package/dist/hotkey-sequence-recorder.cjs.map +0 -1
- package/dist/hotkey-sequence-recorder.d.cts +0 -79
- package/dist/hotkey-sequence-recorder.js.map +0 -1
- package/dist/hotkey.d.cts +0 -301
- package/dist/index.cjs +0 -63
- package/dist/index.d.cts +0 -13
- package/dist/key-state-tracker.cjs +0 -197
- package/dist/key-state-tracker.cjs.map +0 -1
- package/dist/key-state-tracker.d.cts +0 -107
- package/dist/key-state-tracker.js.map +0 -1
- package/dist/manager.utils.cjs +0 -115
- package/dist/manager.utils.cjs.map +0 -1
- package/dist/manager.utils.d.cts +0 -13
- package/dist/manager.utils.d.ts +0 -13
- package/dist/manager.utils.js.map +0 -1
- package/dist/match.cjs +0 -153
- package/dist/match.cjs.map +0 -1
- package/dist/match.d.cts +0 -85
- package/dist/match.js.map +0 -1
- package/dist/parse.cjs +0 -228
- package/dist/parse.cjs.map +0 -1
- package/dist/parse.d.cts +0 -128
- package/dist/parse.js.map +0 -1
- package/dist/recorder-chord.cjs +0 -18
- package/dist/recorder-chord.cjs.map +0 -1
- package/dist/recorder-chord.js +0 -18
- package/dist/recorder-chord.js.map +0 -1
- package/dist/sequence-manager.cjs +0 -415
- package/dist/sequence-manager.cjs.map +0 -1
- package/dist/sequence-manager.d.cts +0 -157
- package/dist/sequence-manager.js.map +0 -1
- package/dist/validate.cjs +0 -116
- package/dist/validate.cjs.map +0 -1
- package/dist/validate.d.cts +0 -56
- package/dist/validate.js.map +0 -1
- package/src/constants.ts +0 -603
- package/src/format.ts +0 -142
- package/src/hotkey-manager.ts +0 -759
- package/src/hotkey-recorder.ts +0 -272
- package/src/hotkey-sequence-recorder.ts +0 -328
- package/src/hotkey.ts +0 -436
- package/src/index.ts +0 -11
- package/src/key-state-tracker.ts +0 -249
- package/src/manager.utils.ts +0 -231
- package/src/match.ts +0 -259
- package/src/parse.ts +0 -328
- package/src/recorder-chord.ts +0 -25
- package/src/sequence-manager.ts +0 -734
- package/src/validate.ts +0 -171
package/dist/constants.d.ts
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import { CanonicalModifier, EditingKey, FunctionKey, LetterKey, NavigationKey, NumberKey, PunctuationKey } from "./
|
|
2
|
-
|
|
1
|
+
import { CanonicalModifier, EditingKey, FunctionKey, LetterKey, NavigationKey, NumberKey, PunctuationKey } from "./key.types.js";
|
|
3
2
|
//#region src/constants.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Detects the current platform based on browser navigator properties.
|
|
6
|
-
*
|
|
7
|
-
* Used internally to resolve platform-adaptive modifiers like 'Mod' (Command on Mac,
|
|
8
|
-
* Control elsewhere) and for platform-specific hotkey formatting.
|
|
9
|
-
*
|
|
10
|
-
* @returns The detected platform: 'mac', 'windows', or 'linux'
|
|
11
|
-
* @remarks Defaults to 'linux' in SSR environments where navigator is undefined
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const platform = detectPlatform() // 'mac' | 'windows' | 'linux'
|
|
16
|
-
* const modifier = resolveModifier('Mod', platform) // 'Meta' on Mac, 'Control' elsewhere
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
declare function detectPlatform(): 'mac' | 'windows' | 'linux';
|
|
20
3
|
/**
|
|
21
4
|
* Canonical order for modifiers in normalized hotkey strings.
|
|
22
5
|
*
|
|
@@ -31,7 +14,7 @@ declare function detectPlatform(): 'mac' | 'windows' | 'linux';
|
|
|
31
14
|
* // Normalized: 'Control+Alt+Shift+Meta+S' (following MODIFIER_ORDER)
|
|
32
15
|
* ```
|
|
33
16
|
*/
|
|
34
|
-
declare const MODIFIER_ORDER: Array<CanonicalModifier>;
|
|
17
|
+
export declare const MODIFIER_ORDER: Array<CanonicalModifier>;
|
|
35
18
|
/**
|
|
36
19
|
* Set of canonical modifier key names for fast lookup.
|
|
37
20
|
*
|
|
@@ -39,7 +22,7 @@ declare const MODIFIER_ORDER: Array<CanonicalModifier>;
|
|
|
39
22
|
* a modifier is released so we can clear non-modifier keys whose keyup events
|
|
40
23
|
* may have been swallowed by the OS (e.g. macOS Cmd+key combos).
|
|
41
24
|
*/
|
|
42
|
-
declare const MODIFIER_KEYS: Set<string>;
|
|
25
|
+
export declare const MODIFIER_KEYS: Set<string>;
|
|
43
26
|
/**
|
|
44
27
|
* Maps modifier key aliases to their canonical form or platform-adaptive 'Mod'.
|
|
45
28
|
*
|
|
@@ -59,36 +42,14 @@ declare const MODIFIER_KEYS: Set<string>;
|
|
|
59
42
|
* MODIFIER_ALIASES['Mod'] // 'Mod' (resolved at runtime)
|
|
60
43
|
* ```
|
|
61
44
|
*/
|
|
62
|
-
declare const MODIFIER_ALIASES: Record<string, CanonicalModifier | 'Mod'>;
|
|
63
|
-
/**
|
|
64
|
-
* Resolves the platform-adaptive 'Mod' modifier to the appropriate canonical modifier.
|
|
65
|
-
*
|
|
66
|
-
* The 'Mod' token represents the "primary modifier" on each platform:
|
|
67
|
-
* - macOS: 'Meta' (Command key ⌘)
|
|
68
|
-
* - Windows/Linux: 'Control' (Ctrl key)
|
|
69
|
-
*
|
|
70
|
-
* This enables cross-platform hotkey definitions like 'Mod+S' that automatically
|
|
71
|
-
* map to Command+S on Mac and Ctrl+S on Windows/Linux.
|
|
72
|
-
*
|
|
73
|
-
* @param modifier - The modifier to resolve. If 'Mod', resolves based on platform.
|
|
74
|
-
* @param platform - The target platform. Defaults to auto-detection.
|
|
75
|
-
* @returns The canonical modifier name ('Control', 'Shift', 'Alt', or 'Meta')
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```ts
|
|
79
|
-
* resolveModifier('Mod', 'mac') // 'Meta'
|
|
80
|
-
* resolveModifier('Mod', 'windows') // 'Control'
|
|
81
|
-
* resolveModifier('Control', 'mac') // 'Control' (unchanged)
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
declare function resolveModifier(modifier: CanonicalModifier | 'Mod', platform?: 'mac' | 'windows' | 'linux'): CanonicalModifier;
|
|
45
|
+
export declare const MODIFIER_ALIASES: Record<string, CanonicalModifier | 'Mod'>;
|
|
85
46
|
/**
|
|
86
47
|
* Set of all valid letter keys (A-Z).
|
|
87
48
|
*
|
|
88
49
|
* Used for validation and type checking. Letter keys are matched case-insensitively
|
|
89
50
|
* in hotkey matching, but normalized to uppercase in canonical form.
|
|
90
51
|
*/
|
|
91
|
-
declare const LETTER_KEYS: Set<LetterKey>;
|
|
52
|
+
export declare const LETTER_KEYS: Set<LetterKey>;
|
|
92
53
|
/**
|
|
93
54
|
* Set of all valid number keys (0-9).
|
|
94
55
|
*
|
|
@@ -96,14 +57,14 @@ declare const LETTER_KEYS: Set<LetterKey>;
|
|
|
96
57
|
* so they're excluded from Shift-based hotkey combinations to avoid
|
|
97
58
|
* layout-dependent behavior.
|
|
98
59
|
*/
|
|
99
|
-
declare const NUMBER_KEYS: Set<NumberKey>;
|
|
60
|
+
export declare const NUMBER_KEYS: Set<NumberKey>;
|
|
100
61
|
/**
|
|
101
|
-
* Set of all valid function keys (F1-
|
|
62
|
+
* Set of all valid function keys (F1-F24).
|
|
102
63
|
*
|
|
103
64
|
* Function keys are commonly used for system shortcuts (e.g., F12 for DevTools,
|
|
104
65
|
* Alt+F4 to close windows) and application-specific commands.
|
|
105
66
|
*/
|
|
106
|
-
declare const FUNCTION_KEYS: Set<FunctionKey>;
|
|
67
|
+
export declare const FUNCTION_KEYS: Set<FunctionKey>;
|
|
107
68
|
/**
|
|
108
69
|
* Set of all valid navigation keys for cursor movement and document navigation.
|
|
109
70
|
*
|
|
@@ -111,7 +72,7 @@ declare const FUNCTION_KEYS: Set<FunctionKey>;
|
|
|
111
72
|
* These keys are commonly combined with modifiers for selection (Shift+ArrowUp) or
|
|
112
73
|
* navigation shortcuts (Alt+ArrowLeft for back).
|
|
113
74
|
*/
|
|
114
|
-
declare const NAVIGATION_KEYS: Set<NavigationKey>;
|
|
75
|
+
export declare const NAVIGATION_KEYS: Set<NavigationKey>;
|
|
115
76
|
/**
|
|
116
77
|
* Set of all valid editing and special keys.
|
|
117
78
|
*
|
|
@@ -119,7 +80,7 @@ declare const NAVIGATION_KEYS: Set<NavigationKey>;
|
|
|
119
80
|
* special actions (Escape, Space). These keys are frequently combined with modifiers
|
|
120
81
|
* for editor shortcuts (Mod+Enter to submit, Shift+Tab to go back).
|
|
121
82
|
*/
|
|
122
|
-
declare const EDITING_KEYS: Set<EditingKey>;
|
|
83
|
+
export declare const EDITING_KEYS: Set<EditingKey>;
|
|
123
84
|
/**
|
|
124
85
|
* Set of all valid punctuation keys commonly used in keyboard shortcuts.
|
|
125
86
|
*
|
|
@@ -132,7 +93,7 @@ declare const EDITING_KEYS: Set<EditingKey>;
|
|
|
132
93
|
* Note: Punctuation keys are affected by Shift (Shift+',' → '<' on US layout),
|
|
133
94
|
* so they're excluded from Shift-based hotkey combinations to avoid layout-dependent behavior.
|
|
134
95
|
*/
|
|
135
|
-
declare const PUNCTUATION_KEYS: Set<PunctuationKey>;
|
|
96
|
+
export declare const PUNCTUATION_KEYS: Set<PunctuationKey>;
|
|
136
97
|
/**
|
|
137
98
|
* Maps `KeyboardEvent.code` values for punctuation keys to their canonical characters.
|
|
138
99
|
*
|
|
@@ -142,7 +103,7 @@ declare const PUNCTUATION_KEYS: Set<PunctuationKey>;
|
|
|
142
103
|
* falling back to `event.code` for punctuation keys, similar to the existing `Key*`/`Digit*`
|
|
143
104
|
* fallbacks for letters and digits.
|
|
144
105
|
*/
|
|
145
|
-
declare const PUNCTUATION_CODE_MAP: Record<string, string>;
|
|
106
|
+
export declare const PUNCTUATION_CODE_MAP: Record<string, string>;
|
|
146
107
|
/**
|
|
147
108
|
* Set of all valid non-modifier keys.
|
|
148
109
|
*
|
|
@@ -157,7 +118,7 @@ declare const PUNCTUATION_CODE_MAP: Record<string, string>;
|
|
|
157
118
|
* @see {@link EDITING_KEYS}
|
|
158
119
|
* @see {@link PUNCTUATION_KEYS}
|
|
159
120
|
*/
|
|
160
|
-
declare const ALL_KEYS: Set<LetterKey | NumberKey | FunctionKey | NavigationKey | EditingKey | PunctuationKey>;
|
|
121
|
+
export declare const ALL_KEYS: Set<LetterKey | NumberKey | FunctionKey | NavigationKey | EditingKey | PunctuationKey | "CapsLock" | "ContextMenu" | "Convert" | "KanaMode" | "NonConvert" | "Help" | "Insert" | "NumLock" | "Fn" | "FnLock" | "PrintScreen" | "ScrollLock" | "Pause" | "BrowserBack" | "BrowserFavorites" | "BrowserForward" | "BrowserHome" | "BrowserRefresh" | "BrowserSearch" | "BrowserStop" | "Eject" | "LaunchMail" | "MediaPlayPause" | "MediaStop" | "MediaTrackNext" | "MediaTrackPrevious" | "Power" | "AudioVolumeDown" | "AudioVolumeMute" | "AudioVolumeUp" | "WakeUp" | "Hyper" | "Super" | "Again" | "Copy" | "Cut" | "Find" | "Open" | "Paste" | "Props" | "Select" | "Undo" | "Hiragana" | "Katakana" | "Clear" | "Cancel" | "Standby" | "LaunchApplication1" | "LaunchApplication2" | "LaunchMediaPlayer" | "HangulMode" | "HanjaMode" | "Zenkaku" | "Hankaku" | "ZenkakuHankaku">;
|
|
161
122
|
/**
|
|
162
123
|
* Normalizes a key name to its canonical form.
|
|
163
124
|
*
|
|
@@ -182,7 +143,7 @@ declare const ALL_KEYS: Set<LetterKey | NumberKey | FunctionKey | NavigationKey
|
|
|
182
143
|
* normalizeKeyName('ArrowUp') // 'ArrowUp' (already canonical)
|
|
183
144
|
* ```
|
|
184
145
|
*/
|
|
185
|
-
declare function isSingleLetterKey(key: string): boolean;
|
|
146
|
+
export declare function isSingleLetterKey(key: string): boolean;
|
|
186
147
|
/**
|
|
187
148
|
* Normalizes a key name to its canonical form.
|
|
188
149
|
*
|
|
@@ -197,94 +158,5 @@ declare function isSingleLetterKey(key: string): boolean;
|
|
|
197
158
|
* normalizeKeyName('ArrowUp') // 'ArrowUp' (already canonical)
|
|
198
159
|
* ```
|
|
199
160
|
*/
|
|
200
|
-
declare function normalizeKeyName(key: string): string;
|
|
201
|
-
|
|
202
|
-
* Modifier key symbols for macOS display.
|
|
203
|
-
*
|
|
204
|
-
* Used by formatting functions to display hotkeys with macOS-style symbols
|
|
205
|
-
* (e.g., ⌘ for Command, ⌃ for Control) instead of text labels. This provides
|
|
206
|
-
* a native macOS look and feel in hotkey displays.
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* ```ts
|
|
210
|
-
* MAC_MODIFIER_SYMBOLS['Meta'] // '⌘'
|
|
211
|
-
* MAC_MODIFIER_SYMBOLS['Control'] // '⌃'
|
|
212
|
-
* MAC_MODIFIER_SYMBOLS['Alt'] // '⌥'
|
|
213
|
-
* MAC_MODIFIER_SYMBOLS['Shift'] // '⇧'
|
|
214
|
-
* ```
|
|
215
|
-
*/
|
|
216
|
-
declare const MAC_MODIFIER_SYMBOLS: Record<CanonicalModifier | 'Mod', string>;
|
|
217
|
-
/**
|
|
218
|
-
* Modifier key labels for macOS display.
|
|
219
|
-
*
|
|
220
|
-
* Used by formatting functions to display hotkeys with macOS-style text labels
|
|
221
|
-
* (e.g., 'Control' for Control, 'Option' for Alt, 'Cmd' for Meta) instead of symbols.
|
|
222
|
-
* This provides a familiar macOS look and feel in hotkey displays.
|
|
223
|
-
*
|
|
224
|
-
* @example
|
|
225
|
-
* ```ts
|
|
226
|
-
* MAC_MODIFIER_LABELS['Control'] // 'control'
|
|
227
|
-
* MAC_MODIFIER_LABELS['Alt'] // 'option'
|
|
228
|
-
* MAC_MODIFIER_LABELS['Shift'] // 'shift'
|
|
229
|
-
* MAC_MODIFIER_LABELS['Meta'] // 'cmd'
|
|
230
|
-
* ```
|
|
231
|
-
*/
|
|
232
|
-
declare const MAC_MODIFIER_LABELS: Record<CanonicalModifier | 'Mod', string>;
|
|
233
|
-
/**
|
|
234
|
-
* Modifier key labels for Windows/Linux display.
|
|
235
|
-
*
|
|
236
|
-
* Used by formatting functions to display hotkeys with standard text labels
|
|
237
|
-
* (e.g., 'Ctrl' for Control, 'Win' for Meta/Windows key) instead of symbols.
|
|
238
|
-
* This provides a familiar Windows/Linux look and feel in hotkey displays.
|
|
239
|
-
*
|
|
240
|
-
* @example
|
|
241
|
-
* ```ts
|
|
242
|
-
* STANDARD_MODIFIER_LABELS['Control'] // 'Ctrl'
|
|
243
|
-
* STANDARD_MODIFIER_LABELS['Meta'] // 'Win'
|
|
244
|
-
* STANDARD_MODIFIER_LABELS['Alt'] // 'Alt'
|
|
245
|
-
* STANDARD_MODIFIER_LABELS['Shift'] // 'Shift'
|
|
246
|
-
* ```
|
|
247
|
-
*/
|
|
248
|
-
declare const WINDOWS_MODIFIER_LABELS: Record<CanonicalModifier | 'Mod', string>;
|
|
249
|
-
declare const LINUX_MODIFIER_LABELS: Record<CanonicalModifier | 'Mod', string>;
|
|
250
|
-
declare const PUNCTUATION_KEY_DISPLAY_LABELS: {
|
|
251
|
-
readonly '`': "Backquote";
|
|
252
|
-
readonly '\\': "Backslash";
|
|
253
|
-
readonly '[': "Left Bracket";
|
|
254
|
-
readonly ']': "Right Bracket";
|
|
255
|
-
readonly ',': "Comma";
|
|
256
|
-
readonly '=': "Equal";
|
|
257
|
-
readonly '-': "Minus";
|
|
258
|
-
readonly '.': "Period";
|
|
259
|
-
readonly ';': "Semicolon";
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* Special key symbols for display formatting.
|
|
263
|
-
*
|
|
264
|
-
* Maps certain keys to their visual symbols for better readability in hotkey displays.
|
|
265
|
-
* Used by formatting functions to show symbols like ↑ for ArrowUp or ↵ for Enter
|
|
266
|
-
* instead of text labels.
|
|
267
|
-
*
|
|
268
|
-
* @example
|
|
269
|
-
* ```ts
|
|
270
|
-
* KEY_DISPLAY_SYMBOLS['ArrowUp'] // '↑'
|
|
271
|
-
* KEY_DISPLAY_SYMBOLS['Enter'] // '↵'
|
|
272
|
-
* KEY_DISPLAY_SYMBOLS['Escape'] // 'Esc'
|
|
273
|
-
* KEY_DISPLAY_SYMBOLS['Space'] // '␣'
|
|
274
|
-
* ```
|
|
275
|
-
*/
|
|
276
|
-
declare const KEY_DISPLAY_SYMBOLS: {
|
|
277
|
-
readonly ArrowUp: "↑";
|
|
278
|
-
readonly ArrowDown: "↓";
|
|
279
|
-
readonly ArrowLeft: "←";
|
|
280
|
-
readonly ArrowRight: "→";
|
|
281
|
-
readonly Enter: "↵";
|
|
282
|
-
readonly Escape: "Esc";
|
|
283
|
-
readonly Backspace: "⌫";
|
|
284
|
-
readonly Delete: "⌦";
|
|
285
|
-
readonly Tab: "⇥";
|
|
286
|
-
readonly Space: "␣";
|
|
287
|
-
};
|
|
288
|
-
//#endregion
|
|
289
|
-
export { ALL_KEYS, EDITING_KEYS, FUNCTION_KEYS, KEY_DISPLAY_SYMBOLS, LETTER_KEYS, LINUX_MODIFIER_LABELS, MAC_MODIFIER_LABELS, MAC_MODIFIER_SYMBOLS, MODIFIER_ALIASES, MODIFIER_KEYS, MODIFIER_ORDER, NAVIGATION_KEYS, NUMBER_KEYS, PUNCTUATION_CODE_MAP, PUNCTUATION_KEYS, PUNCTUATION_KEY_DISPLAY_LABELS, WINDOWS_MODIFIER_LABELS, detectPlatform, isSingleLetterKey, normalizeKeyName, resolveModifier };
|
|
290
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
161
|
+
export declare function normalizeKeyName(key: string): string;
|
|
162
|
+
//#endregion
|
package/dist/constants.js
CHANGED
|
@@ -1,28 +1,7 @@
|
|
|
1
|
+
import { LOGICAL_ONLY_NAMED_KEYS, SHARED_NAMED_KEYS } from "./_named-keys.js";
|
|
2
|
+
|
|
1
3
|
//#region src/constants.ts
|
|
2
4
|
/**
|
|
3
|
-
* Detects the current platform based on browser navigator properties.
|
|
4
|
-
*
|
|
5
|
-
* Used internally to resolve platform-adaptive modifiers like 'Mod' (Command on Mac,
|
|
6
|
-
* Control elsewhere) and for platform-specific hotkey formatting.
|
|
7
|
-
*
|
|
8
|
-
* @returns The detected platform: 'mac', 'windows', or 'linux'
|
|
9
|
-
* @remarks Defaults to 'linux' in SSR environments where navigator is undefined
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const platform = detectPlatform() // 'mac' | 'windows' | 'linux'
|
|
14
|
-
* const modifier = resolveModifier('Mod', platform) // 'Meta' on Mac, 'Control' elsewhere
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
function detectPlatform() {
|
|
18
|
-
if (typeof navigator === "undefined") return "linux";
|
|
19
|
-
const platform = navigator.platform?.toLowerCase() ?? "";
|
|
20
|
-
const userAgent = navigator.userAgent?.toLowerCase() ?? "";
|
|
21
|
-
if (platform.includes("mac") || userAgent.includes("mac")) return "mac";
|
|
22
|
-
if (platform.includes("win") || userAgent.includes("win")) return "windows";
|
|
23
|
-
return "linux";
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
5
|
* Canonical order for modifiers in normalized hotkey strings.
|
|
27
6
|
*
|
|
28
7
|
* Defines the standard order in which modifiers should appear when formatting
|
|
@@ -96,37 +75,12 @@ const MODIFIER_ALIASES = {
|
|
|
96
75
|
mod: "Mod"
|
|
97
76
|
};
|
|
98
77
|
/**
|
|
99
|
-
* Resolves the platform-adaptive 'Mod' modifier to the appropriate canonical modifier.
|
|
100
|
-
*
|
|
101
|
-
* The 'Mod' token represents the "primary modifier" on each platform:
|
|
102
|
-
* - macOS: 'Meta' (Command key ⌘)
|
|
103
|
-
* - Windows/Linux: 'Control' (Ctrl key)
|
|
104
|
-
*
|
|
105
|
-
* This enables cross-platform hotkey definitions like 'Mod+S' that automatically
|
|
106
|
-
* map to Command+S on Mac and Ctrl+S on Windows/Linux.
|
|
107
|
-
*
|
|
108
|
-
* @param modifier - The modifier to resolve. If 'Mod', resolves based on platform.
|
|
109
|
-
* @param platform - The target platform. Defaults to auto-detection.
|
|
110
|
-
* @returns The canonical modifier name ('Control', 'Shift', 'Alt', or 'Meta')
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* ```ts
|
|
114
|
-
* resolveModifier('Mod', 'mac') // 'Meta'
|
|
115
|
-
* resolveModifier('Mod', 'windows') // 'Control'
|
|
116
|
-
* resolveModifier('Control', 'mac') // 'Control' (unchanged)
|
|
117
|
-
* ```
|
|
118
|
-
*/
|
|
119
|
-
function resolveModifier(modifier, platform = detectPlatform()) {
|
|
120
|
-
if (modifier === "Mod") return platform === "mac" ? "Meta" : "Control";
|
|
121
|
-
return modifier;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
78
|
* Set of all valid letter keys (A-Z).
|
|
125
79
|
*
|
|
126
80
|
* Used for validation and type checking. Letter keys are matched case-insensitively
|
|
127
81
|
* in hotkey matching, but normalized to uppercase in canonical form.
|
|
128
82
|
*/
|
|
129
|
-
const LETTER_KEYS = new Set([
|
|
83
|
+
const LETTER_KEYS = /* @__PURE__ */ new Set([
|
|
130
84
|
"A",
|
|
131
85
|
"B",
|
|
132
86
|
"C",
|
|
@@ -161,7 +115,7 @@ const LETTER_KEYS = new Set([
|
|
|
161
115
|
* so they're excluded from Shift-based hotkey combinations to avoid
|
|
162
116
|
* layout-dependent behavior.
|
|
163
117
|
*/
|
|
164
|
-
const NUMBER_KEYS = new Set([
|
|
118
|
+
const NUMBER_KEYS = /* @__PURE__ */ new Set([
|
|
165
119
|
"0",
|
|
166
120
|
"1",
|
|
167
121
|
"2",
|
|
@@ -174,12 +128,12 @@ const NUMBER_KEYS = new Set([
|
|
|
174
128
|
"9"
|
|
175
129
|
]);
|
|
176
130
|
/**
|
|
177
|
-
* Set of all valid function keys (F1-
|
|
131
|
+
* Set of all valid function keys (F1-F24).
|
|
178
132
|
*
|
|
179
133
|
* Function keys are commonly used for system shortcuts (e.g., F12 for DevTools,
|
|
180
134
|
* Alt+F4 to close windows) and application-specific commands.
|
|
181
135
|
*/
|
|
182
|
-
const FUNCTION_KEYS = new Set([
|
|
136
|
+
const FUNCTION_KEYS = /* @__PURE__ */ new Set([
|
|
183
137
|
"F1",
|
|
184
138
|
"F2",
|
|
185
139
|
"F3",
|
|
@@ -191,7 +145,19 @@ const FUNCTION_KEYS = new Set([
|
|
|
191
145
|
"F9",
|
|
192
146
|
"F10",
|
|
193
147
|
"F11",
|
|
194
|
-
"F12"
|
|
148
|
+
"F12",
|
|
149
|
+
"F13",
|
|
150
|
+
"F14",
|
|
151
|
+
"F15",
|
|
152
|
+
"F16",
|
|
153
|
+
"F17",
|
|
154
|
+
"F18",
|
|
155
|
+
"F19",
|
|
156
|
+
"F20",
|
|
157
|
+
"F21",
|
|
158
|
+
"F22",
|
|
159
|
+
"F23",
|
|
160
|
+
"F24"
|
|
195
161
|
]);
|
|
196
162
|
/**
|
|
197
163
|
* Set of all valid navigation keys for cursor movement and document navigation.
|
|
@@ -200,7 +166,7 @@ const FUNCTION_KEYS = new Set([
|
|
|
200
166
|
* These keys are commonly combined with modifiers for selection (Shift+ArrowUp) or
|
|
201
167
|
* navigation shortcuts (Alt+ArrowLeft for back).
|
|
202
168
|
*/
|
|
203
|
-
const NAVIGATION_KEYS = new Set([
|
|
169
|
+
const NAVIGATION_KEYS = /* @__PURE__ */ new Set([
|
|
204
170
|
"ArrowUp",
|
|
205
171
|
"ArrowDown",
|
|
206
172
|
"ArrowLeft",
|
|
@@ -217,7 +183,7 @@ const NAVIGATION_KEYS = new Set([
|
|
|
217
183
|
* special actions (Escape, Space). These keys are frequently combined with modifiers
|
|
218
184
|
* for editor shortcuts (Mod+Enter to submit, Shift+Tab to go back).
|
|
219
185
|
*/
|
|
220
|
-
const EDITING_KEYS = new Set([
|
|
186
|
+
const EDITING_KEYS = /* @__PURE__ */ new Set([
|
|
221
187
|
"Enter",
|
|
222
188
|
"Escape",
|
|
223
189
|
"Space",
|
|
@@ -237,7 +203,7 @@ const EDITING_KEYS = new Set([
|
|
|
237
203
|
* Note: Punctuation keys are affected by Shift (Shift+',' → '<' on US layout),
|
|
238
204
|
* so they're excluded from Shift-based hotkey combinations to avoid layout-dependent behavior.
|
|
239
205
|
*/
|
|
240
|
-
const PUNCTUATION_KEYS = new Set([
|
|
206
|
+
const PUNCTUATION_KEYS = /* @__PURE__ */ new Set([
|
|
241
207
|
"/",
|
|
242
208
|
"[",
|
|
243
209
|
"]",
|
|
@@ -247,7 +213,29 @@ const PUNCTUATION_KEYS = new Set([
|
|
|
247
213
|
",",
|
|
248
214
|
".",
|
|
249
215
|
";",
|
|
250
|
-
"`"
|
|
216
|
+
"`",
|
|
217
|
+
"'",
|
|
218
|
+
"+",
|
|
219
|
+
"?",
|
|
220
|
+
"!",
|
|
221
|
+
"@",
|
|
222
|
+
"#",
|
|
223
|
+
"$",
|
|
224
|
+
"%",
|
|
225
|
+
"^",
|
|
226
|
+
"&",
|
|
227
|
+
"*",
|
|
228
|
+
"(",
|
|
229
|
+
")",
|
|
230
|
+
"_",
|
|
231
|
+
"{",
|
|
232
|
+
"}",
|
|
233
|
+
"|",
|
|
234
|
+
":",
|
|
235
|
+
"\"",
|
|
236
|
+
"<",
|
|
237
|
+
">",
|
|
238
|
+
"~"
|
|
251
239
|
]);
|
|
252
240
|
/**
|
|
253
241
|
* Maps `KeyboardEvent.code` values for punctuation keys to their canonical characters.
|
|
@@ -267,6 +255,7 @@ const PUNCTUATION_CODE_MAP = {
|
|
|
267
255
|
Equal: "=",
|
|
268
256
|
Minus: "-",
|
|
269
257
|
Period: ".",
|
|
258
|
+
Quote: "'",
|
|
270
259
|
Semicolon: ";",
|
|
271
260
|
Slash: "/"
|
|
272
261
|
};
|
|
@@ -284,14 +273,17 @@ const PUNCTUATION_CODE_MAP = {
|
|
|
284
273
|
* @see {@link EDITING_KEYS}
|
|
285
274
|
* @see {@link PUNCTUATION_KEYS}
|
|
286
275
|
*/
|
|
287
|
-
const ALL_KEYS = new Set([
|
|
276
|
+
const ALL_KEYS = /* @__PURE__ */ new Set([
|
|
288
277
|
...LETTER_KEYS,
|
|
289
278
|
...NUMBER_KEYS,
|
|
290
279
|
...FUNCTION_KEYS,
|
|
291
280
|
...NAVIGATION_KEYS,
|
|
292
281
|
...EDITING_KEYS,
|
|
293
|
-
...PUNCTUATION_KEYS
|
|
282
|
+
...PUNCTUATION_KEYS,
|
|
283
|
+
...SHARED_NAMED_KEYS,
|
|
284
|
+
...LOGICAL_ONLY_NAMED_KEYS
|
|
294
285
|
]);
|
|
286
|
+
const CANONICAL_KEY_NAMES = new Map(Array.from(ALL_KEYS, (key) => [key.toLowerCase(), key]));
|
|
295
287
|
/**
|
|
296
288
|
* Maps key name aliases to their canonical form.
|
|
297
289
|
*
|
|
@@ -312,6 +304,8 @@ const ALL_KEYS = new Set([
|
|
|
312
304
|
* ```
|
|
313
305
|
*/
|
|
314
306
|
const KEY_ALIASES = {
|
|
307
|
+
Plus: "+",
|
|
308
|
+
plus: "+",
|
|
315
309
|
Esc: "Escape",
|
|
316
310
|
esc: "Escape",
|
|
317
311
|
escape: "Escape",
|
|
@@ -396,119 +390,8 @@ function normalizeKeyName(key) {
|
|
|
396
390
|
const upper = key.toUpperCase();
|
|
397
391
|
return upper.length === 1 ? upper : key;
|
|
398
392
|
}
|
|
399
|
-
|
|
400
|
-
if (/^F([1-9]|1[0-2])$/.test(upperKey)) return upperKey;
|
|
401
|
-
return key;
|
|
393
|
+
return CANONICAL_KEY_NAMES.get(key.toLowerCase()) ?? key;
|
|
402
394
|
}
|
|
403
|
-
/**
|
|
404
|
-
* Modifier key symbols for macOS display.
|
|
405
|
-
*
|
|
406
|
-
* Used by formatting functions to display hotkeys with macOS-style symbols
|
|
407
|
-
* (e.g., ⌘ for Command, ⌃ for Control) instead of text labels. This provides
|
|
408
|
-
* a native macOS look and feel in hotkey displays.
|
|
409
|
-
*
|
|
410
|
-
* @example
|
|
411
|
-
* ```ts
|
|
412
|
-
* MAC_MODIFIER_SYMBOLS['Meta'] // '⌘'
|
|
413
|
-
* MAC_MODIFIER_SYMBOLS['Control'] // '⌃'
|
|
414
|
-
* MAC_MODIFIER_SYMBOLS['Alt'] // '⌥'
|
|
415
|
-
* MAC_MODIFIER_SYMBOLS['Shift'] // '⇧'
|
|
416
|
-
* ```
|
|
417
|
-
*/
|
|
418
|
-
const MAC_MODIFIER_SYMBOLS = {
|
|
419
|
-
Control: "⌃",
|
|
420
|
-
Alt: "⌥",
|
|
421
|
-
Shift: "⇧",
|
|
422
|
-
Meta: "⌘",
|
|
423
|
-
Mod: "⌘"
|
|
424
|
-
};
|
|
425
|
-
/**
|
|
426
|
-
* Modifier key labels for macOS display.
|
|
427
|
-
*
|
|
428
|
-
* Used by formatting functions to display hotkeys with macOS-style text labels
|
|
429
|
-
* (e.g., 'Control' for Control, 'Option' for Alt, 'Cmd' for Meta) instead of symbols.
|
|
430
|
-
* This provides a familiar macOS look and feel in hotkey displays.
|
|
431
|
-
*
|
|
432
|
-
* @example
|
|
433
|
-
* ```ts
|
|
434
|
-
* MAC_MODIFIER_LABELS['Control'] // 'control'
|
|
435
|
-
* MAC_MODIFIER_LABELS['Alt'] // 'option'
|
|
436
|
-
* MAC_MODIFIER_LABELS['Shift'] // 'shift'
|
|
437
|
-
* MAC_MODIFIER_LABELS['Meta'] // 'cmd'
|
|
438
|
-
* ```
|
|
439
|
-
*/
|
|
440
|
-
const MAC_MODIFIER_LABELS = {
|
|
441
|
-
Control: "Control",
|
|
442
|
-
Alt: "Option",
|
|
443
|
-
Shift: "Shift",
|
|
444
|
-
Meta: "Cmd",
|
|
445
|
-
Mod: "Cmd"
|
|
446
|
-
};
|
|
447
|
-
/**
|
|
448
|
-
* Modifier key labels for Windows/Linux display.
|
|
449
|
-
*
|
|
450
|
-
* Used by formatting functions to display hotkeys with standard text labels
|
|
451
|
-
* (e.g., 'Ctrl' for Control, 'Win' for Meta/Windows key) instead of symbols.
|
|
452
|
-
* This provides a familiar Windows/Linux look and feel in hotkey displays.
|
|
453
|
-
*
|
|
454
|
-
* @example
|
|
455
|
-
* ```ts
|
|
456
|
-
* STANDARD_MODIFIER_LABELS['Control'] // 'Ctrl'
|
|
457
|
-
* STANDARD_MODIFIER_LABELS['Meta'] // 'Win'
|
|
458
|
-
* STANDARD_MODIFIER_LABELS['Alt'] // 'Alt'
|
|
459
|
-
* STANDARD_MODIFIER_LABELS['Shift'] // 'Shift'
|
|
460
|
-
* ```
|
|
461
|
-
*/
|
|
462
|
-
const WINDOWS_MODIFIER_LABELS = {
|
|
463
|
-
Control: "Ctrl",
|
|
464
|
-
Alt: "Alt",
|
|
465
|
-
Shift: "Shift",
|
|
466
|
-
Meta: "Win",
|
|
467
|
-
Mod: "Ctrl"
|
|
468
|
-
};
|
|
469
|
-
const LINUX_MODIFIER_LABELS = {
|
|
470
|
-
...WINDOWS_MODIFIER_LABELS,
|
|
471
|
-
Meta: "Super"
|
|
472
|
-
};
|
|
473
|
-
const PUNCTUATION_KEY_DISPLAY_LABELS = {
|
|
474
|
-
"`": "Backquote",
|
|
475
|
-
"\\": "Backslash",
|
|
476
|
-
"[": "Left Bracket",
|
|
477
|
-
"]": "Right Bracket",
|
|
478
|
-
",": "Comma",
|
|
479
|
-
"=": "Equal",
|
|
480
|
-
"-": "Minus",
|
|
481
|
-
".": "Period",
|
|
482
|
-
";": "Semicolon"
|
|
483
|
-
};
|
|
484
|
-
/**
|
|
485
|
-
* Special key symbols for display formatting.
|
|
486
|
-
*
|
|
487
|
-
* Maps certain keys to their visual symbols for better readability in hotkey displays.
|
|
488
|
-
* Used by formatting functions to show symbols like ↑ for ArrowUp or ↵ for Enter
|
|
489
|
-
* instead of text labels.
|
|
490
|
-
*
|
|
491
|
-
* @example
|
|
492
|
-
* ```ts
|
|
493
|
-
* KEY_DISPLAY_SYMBOLS['ArrowUp'] // '↑'
|
|
494
|
-
* KEY_DISPLAY_SYMBOLS['Enter'] // '↵'
|
|
495
|
-
* KEY_DISPLAY_SYMBOLS['Escape'] // 'Esc'
|
|
496
|
-
* KEY_DISPLAY_SYMBOLS['Space'] // '␣'
|
|
497
|
-
* ```
|
|
498
|
-
*/
|
|
499
|
-
const KEY_DISPLAY_SYMBOLS = {
|
|
500
|
-
ArrowUp: "↑",
|
|
501
|
-
ArrowDown: "↓",
|
|
502
|
-
ArrowLeft: "←",
|
|
503
|
-
ArrowRight: "→",
|
|
504
|
-
Enter: "↵",
|
|
505
|
-
Escape: "Esc",
|
|
506
|
-
Backspace: "⌫",
|
|
507
|
-
Delete: "⌦",
|
|
508
|
-
Tab: "⇥",
|
|
509
|
-
Space: "␣"
|
|
510
|
-
};
|
|
511
395
|
|
|
512
396
|
//#endregion
|
|
513
|
-
export { ALL_KEYS, EDITING_KEYS, FUNCTION_KEYS,
|
|
514
|
-
//# sourceMappingURL=constants.js.map
|
|
397
|
+
export { ALL_KEYS, EDITING_KEYS, FUNCTION_KEYS, LETTER_KEYS, MODIFIER_ALIASES, MODIFIER_KEYS, MODIFIER_ORDER, NAVIGATION_KEYS, NUMBER_KEYS, PUNCTUATION_CODE_MAP, PUNCTUATION_KEYS, isSingleLetterKey, normalizeKeyName };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { CanonicalModifier } from "./key.types.js";
|
|
2
|
+
//#region src/display-labels.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Modifier key symbols for macOS display.
|
|
5
|
+
*
|
|
6
|
+
* Used by formatting functions to display hotkeys with macOS-style symbols
|
|
7
|
+
* (e.g., ⌘ for Command, ⌃ for Control) instead of text labels. This provides
|
|
8
|
+
* a native macOS look and feel in hotkey displays.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* MAC_MODIFIER_SYMBOLS['Meta'] // '⌘'
|
|
13
|
+
* MAC_MODIFIER_SYMBOLS['Control'] // '⌃'
|
|
14
|
+
* MAC_MODIFIER_SYMBOLS['Alt'] // '⌥'
|
|
15
|
+
* MAC_MODIFIER_SYMBOLS['Shift'] // '⇧'
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const MAC_MODIFIER_SYMBOLS: Record<CanonicalModifier | 'Mod', string>;
|
|
19
|
+
/**
|
|
20
|
+
* Modifier key labels for macOS display.
|
|
21
|
+
*
|
|
22
|
+
* Used by formatting functions to display hotkeys with macOS-style text labels
|
|
23
|
+
* (e.g., 'Control' for Control, 'Option' for Alt, 'Cmd' for Meta) instead of symbols.
|
|
24
|
+
* This provides a familiar macOS look and feel in hotkey displays.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* MAC_MODIFIER_LABELS['Control'] // 'control'
|
|
29
|
+
* MAC_MODIFIER_LABELS['Alt'] // 'option'
|
|
30
|
+
* MAC_MODIFIER_LABELS['Shift'] // 'shift'
|
|
31
|
+
* MAC_MODIFIER_LABELS['Meta'] // 'cmd'
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const MAC_MODIFIER_LABELS: Record<CanonicalModifier | 'Mod', string>;
|
|
35
|
+
/**
|
|
36
|
+
* Modifier key labels for Windows/Linux display.
|
|
37
|
+
*
|
|
38
|
+
* Used by formatting functions to display hotkeys with standard text labels
|
|
39
|
+
* (e.g., 'Ctrl' for Control, 'Win' for Meta/Windows key) instead of symbols.
|
|
40
|
+
* This provides a familiar Windows/Linux look and feel in hotkey displays.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* STANDARD_MODIFIER_LABELS['Control'] // 'Ctrl'
|
|
45
|
+
* STANDARD_MODIFIER_LABELS['Meta'] // 'Win'
|
|
46
|
+
* STANDARD_MODIFIER_LABELS['Alt'] // 'Alt'
|
|
47
|
+
* STANDARD_MODIFIER_LABELS['Shift'] // 'Shift'
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare const WINDOWS_MODIFIER_LABELS: Record<CanonicalModifier | 'Mod', string>;
|
|
51
|
+
export declare const LINUX_MODIFIER_LABELS: Record<CanonicalModifier | 'Mod', string>;
|
|
52
|
+
export declare const PUNCTUATION_KEY_DISPLAY_LABELS: {
|
|
53
|
+
readonly '`': "Backquote";
|
|
54
|
+
readonly '\\': "Backslash";
|
|
55
|
+
readonly '[': "Left Bracket";
|
|
56
|
+
readonly ']': "Right Bracket";
|
|
57
|
+
readonly ',': "Comma";
|
|
58
|
+
readonly '=': "Equal";
|
|
59
|
+
readonly '-': "Minus";
|
|
60
|
+
readonly '.': "Period";
|
|
61
|
+
readonly ';': "Semicolon";
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Special key symbols for display formatting.
|
|
65
|
+
*
|
|
66
|
+
* Maps certain keys to their visual symbols for better readability in hotkey displays.
|
|
67
|
+
* Used by formatting functions to show symbols like ↑ for ArrowUp or ↵ for Enter
|
|
68
|
+
* instead of text labels.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* KEY_DISPLAY_SYMBOLS['ArrowUp'] // '↑'
|
|
73
|
+
* KEY_DISPLAY_SYMBOLS['Enter'] // '↵'
|
|
74
|
+
* KEY_DISPLAY_SYMBOLS['Escape'] // 'Esc'
|
|
75
|
+
* KEY_DISPLAY_SYMBOLS['Space'] // '␣'
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare const KEY_DISPLAY_SYMBOLS: {
|
|
79
|
+
readonly ArrowUp: "↑";
|
|
80
|
+
readonly ArrowDown: "↓";
|
|
81
|
+
readonly ArrowLeft: "←";
|
|
82
|
+
readonly ArrowRight: "→";
|
|
83
|
+
readonly Enter: "↵";
|
|
84
|
+
readonly Escape: "Esc";
|
|
85
|
+
readonly Backspace: "⌫";
|
|
86
|
+
readonly Delete: "⌦";
|
|
87
|
+
readonly Tab: "⇥";
|
|
88
|
+
readonly Space: "␣";
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|