hotkey-router 0.4.1 → 0.5.1

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 CHANGED
@@ -47,10 +47,14 @@ const hotkeys = require('hotkey-router').default
47
47
  const { createRouter } = require('hotkey-router')
48
48
  ```
49
49
 
50
- CDN (ESM):
50
+ Only the main entry has a CommonJS build. The subpaths (`/core`, `/auto`,
51
+ `/reservations`, `/sites`, `/validate`, `/format`) are ESM only, so load them
52
+ with `import` (or `await import()` from CommonJS).
53
+
54
+ CDN (ESM), pinned to a version:
51
55
 
52
56
  ```js
53
- import hotkeys from 'https://cdn.jsdelivr.net/npm/hotkey-router/dist/hotkey-router.min.js'
57
+ import hotkeys from 'https://cdn.jsdelivr.net/npm/hotkey-router@0.5.1/dist/hotkey-router.min.js'
54
58
  ```
55
59
 
56
60
  Nothing at import (v0.4.0+): `hotkey-router/core` has `createRouter` and the
@@ -100,9 +104,11 @@ hotkeys.registerPlugin('docs', {
100
104
  })
101
105
  ```
102
106
 
103
- Browsers and the OS keep some shortcuts for themselves (Ctrl+T, Ctrl+W, Cmd+Q
104
- and more); a page never gets those keys. The examples above use keys that are
105
- free in every major browser. Before picking your own, see
107
+ Browsers and the OS keep some shortcuts for themselves. A page never gets
108
+ some of them (Ctrl+T, Ctrl+W, Cmd+Q). Others, like Ctrl+K, Ctrl+F or Ctrl+S on
109
+ Windows, reach the page first, but the browser acts on them too unless the
110
+ binding sets `preventDefault: true`. The examples above use keys that are free
111
+ in every major browser. Before picking your own, see
106
112
  [Who gets a key](#who-gets-a-key). `hotkey-router/auto` warns in the console
107
113
  when you bind a reserved one.
108
114
 
@@ -115,7 +121,8 @@ when you bind a reserved one.
115
121
  Register a hotkey. Returns an `off()` function.
116
122
 
117
123
  ```js
118
- const off = hotkeys.bind('mod+k', openPalette)
124
+ // preventDefault: on Windows and Linux the browser also uses Ctrl+K (search)
125
+ const off = hotkeys.bind('mod+k', openPalette, null, { preventDefault: true })
119
126
 
120
127
  // Later
121
128
  off()
@@ -200,7 +207,8 @@ hotkeys.bind('delete', deleteItem, null, {
200
207
  Run once:
201
208
 
202
209
  ```js
203
- hotkeys.bind('ctrl+s', saveDraft, null, { once: true })
210
+ // preventDefault, or the browser's Save As dialog opens too
211
+ hotkeys.bind('ctrl+s', saveDraft, null, { once: true, preventDefault: true })
204
212
  ```
205
213
 
206
214
  ### `unbind(hotkey, handler?)`
@@ -278,6 +286,7 @@ Override per-binding with `allowIn()`:
278
286
  // Let the palette open from a focused checkbox or slider, but not from text fields
279
287
  hotkeys.bind('mod+k', openPalette, null, {
280
288
  allowIn: (e) => ['checkbox', 'radio', 'range'].includes(e.composedPath()[0].type),
289
+ preventDefault: true,
281
290
  })
282
291
  ```
283
292
 
@@ -347,7 +356,10 @@ phase.
347
356
 
348
357
  ### `parseHotkey(hotkey, options?)` / `comboFromEvent(event, options?)` (v0.3.0+)
349
358
 
350
- Named exports (also on the default object). `comboFromEvent` turns a
359
+ Named exports (also on the default object). `parseHotkey` returns
360
+ `{ combo, type, raw }`: `combo` is the parsed shape
361
+ (`{ ctrl, meta, alt, shift, key, code, bareModifier }`) that `lookupReservation`
362
+ takes, and `type` is `'keydown'` or `'keyup'`. `comboFromEvent` turns a
351
363
  keyboard event into a hotkey string for a "press your keys" recorder:
352
364
  physical by default, `{ useMod: true }` writes the platform's primary
353
365
  modifier as `mod`, and it returns `null` while only a modifier is held.
@@ -419,9 +431,12 @@ hotkeys.bind('escape', closeModal, null, {
419
431
 
420
432
  A keypress meets these in order, and each one can stop it before the next:
421
433
 
422
- 1. **The browser and the OS.** Reserved shortcuts (Ctrl+T, Cmd+Q, Spotlight)
423
- are taken before the page gets a keydown, and no listener can get them
424
- back. [Conflict warnings](#conflict-warnings-v020) flag them when you bind.
434
+ 1. **The browser and the OS.** Some reserved shortcuts (Ctrl+T, Ctrl+W,
435
+ Cmd+Q, Spotlight) are taken before the page gets a keydown, and no
436
+ listener can get them back. Others (most Ctrl+letter keys on Windows and
437
+ Linux, such as Ctrl+K, Ctrl+F, Ctrl+S) reach the page first: the winning
438
+ binding's `preventDefault` keeps the browser out, and without it both act.
439
+ [Conflict warnings](#conflict-warnings-v020) flag both kinds when you bind.
425
440
  2. **The capture phase, from `window` down to the focused element.** Bindings
426
441
  with `{ capture: true }`, or every binding of a router started with
427
442
  `init({ capture: true })`, run here, at the router's target. That's before
@@ -504,7 +519,7 @@ The `code:` value is **case-sensitive** (matches the camelCase `KeyboardEvent.co
504
519
 
505
520
  ### Conflict warnings (v0.2.0+)
506
521
 
507
- Some combos are reserved by the browser chrome (find bar, devtools, bookmarks) or the OS (Spotlight, window management). They never reach page-world JavaScript, no matter how early you listen or whether you call `preventDefault`. hotkey-router ships an **opt-in** reservation table that emits a soft warning at bind time, so the silent failure becomes a noisy one.
522
+ Some combos are reserved by the browser chrome (find bar, devtools, bookmarks) or the OS (Spotlight, window management). The hard ones never reach page-world JavaScript, no matter how early you listen or whether you call `preventDefault`: Ctrl+T, Ctrl+N and Ctrl+W on Windows, for example. Others reach the page first, and the browser acts on them too unless the page calls `preventDefault`: most Ctrl+letter shortcuts on Windows and Linux, such as Ctrl+K, Ctrl+F, Ctrl+P and Ctrl+S (checked with real key presses in Chrome, Edge and Firefox on Windows, 2026-10-29). hotkey-router ships an **opt-in** reservation table that emits a warning at bind time, so the silent failure (or the double action) becomes a noisy one.
508
523
 
509
524
  The feature is opt-in by design: the core router is ~11 KB minified (~4.9 KB gzipped), and the reservation module (~23 KB minified, ~5.5 KB gzipped, mostly data) is tree-shaken out entirely unless you import it.
510
525
 
@@ -515,8 +530,8 @@ import hotkeys from 'hotkey-router/auto'
515
530
 
516
531
  hotkeys.bind('meta+shift+f', toggleFullscreen)
517
532
  // Firefox on macOS:
518
- // [hotkey-router] "meta+shift+f" reserved by firefox on macOS:
519
- // "Toggle fullscreen" [hard], will not fire.
533
+ // [hotkey-router] "meta+shift+f" (meta+shift+f) reserved by firefox on macOS:
534
+ // "Toggle fullscreen" [hard] — will not fire.
520
535
  ```
521
536
 
522
537
  Explicit install, keep using the tiny core, install warnings yourself:
@@ -542,6 +557,7 @@ hotkeys.bind('meta+shift+f', toggleFullscreen)
542
557
  | `compose` | `info` | macOS Option+letter types a special char in inputs. |
543
558
  | `system-text` | `info` | Mac Ctrl+letter cursor controls inside text inputs. |
544
559
  | `devtools-open` | `info` | Only relevant when DevTools is already open. |
560
+ | `preventable` | `warn` without `preventDefault: true`, else `info` | The browser's shortcut, but the page sees it first and `preventDefault: true` keeps the browser out. Without it, both act. |
545
561
 
546
562
  **Per-bind opt-out:**
547
563
 
@@ -595,7 +611,7 @@ collide with the page's own shortcuts: Google Docs uses Ctrl+Shift+. for font
595
611
  size, GitHub for "quote". Unlike browser keys, those reach the page, so the
596
612
  app can choose. `hotkey-router/sites` knows which popular sites use which
597
613
  chords in the Ctrl/Cmd+Shift, Ctrl/Cmd+Alt, Shift+Alt and Ctrl/Cmd+Alt+Shift
598
- families ([docs/site-hotkeys.md](docs/site-hotkeys.md), sourced data in
614
+ families ([docs/site-hotkeys.md](https://github.com/iWhatty/hotkey-router/blob/main/docs/site-hotkeys.md), sourced data in
599
615
  `data/site-hotkeys.json`) and builds a `when()` gate that yields to the site
600
616
  unless the user is focused on the app:
601
617
 
@@ -652,10 +668,12 @@ field.addEventListener('keydown', (e) => {
652
668
  Errors (`ok: false`): no key, no modifier, Alt as the only modifier on
653
669
  Windows/Linux, a rule you asked for (`requirePrimary`, `minModifiers`),
654
670
  already in `taken`, or reserved by a browser/OS (never reaches the page).
655
- Warnings (`ok: true`): reserved only in some situations, Ctrl+Alt acting as
656
- AltGr on some Windows layouts, and sites that use the same keys.
671
+ Warnings (`ok: true`): reserved only in some situations; the browser's own
672
+ shortcut that the page can win with `preventDefault` (`details.severity` is
673
+ `'preventable'`; most Ctrl+letter keys on Windows and Linux); Ctrl+Alt acting
674
+ as AltGr on some Windows layouts; and sites that use the same keys.
657
675
 
658
- It loads both data tables: with them, about 62 KB minified (~15 KB
676
+ It loads both data tables: with them, about 69 KB minified (~16 KB
659
677
  gzipped). Import it in the settings page that records keys, not in code
660
678
  that runs on every page.
661
679
 
@@ -793,7 +811,7 @@ Everything runs locally; there is no hosted CI.
793
811
  `BROWSERS=chrome` runs one. Needs Node 22 or later.
794
812
  - `npm run data:age` (v0.4.0+): how old the browser/OS and website shortcut
795
813
  tables are; warns past six months (the build prints the same warning).
796
- [docs/data-review.md](docs/data-review.md) says how to review them.
814
+ [docs/data-review.md](https://github.com/iWhatty/hotkey-router/blob/main/docs/data-review.md) says how to review them.
797
815
  - `scripts/key-check.ahk` (Windows, AutoHotkey 1.1): real keyboard layouts
798
816
  (Russian, Greek, Hebrew, Polish AltGr) in Chrome, Firefox and Edge, with
799
817
  results written to `docs/notes/`. See `playground/key-check.html`.
@@ -802,4 +820,4 @@ Everything runs locally; there is no hosted CI.
802
820
 
803
821
  ## License
804
822
 
805
- Licensed under AGPL-3.0 with WATT3D Additional Terms. See [LICENSE](./LICENSE) and [ADDITIONAL_TERMS.md](./ADDITIONAL_TERMS.md). Commercial AI/model-training use requires compliance with those terms or a separate WATT3D license. © WATT3D.
823
+ Licensed under AGPL-3.0 with WATT3D Additional Terms. See [LICENSE](https://github.com/iWhatty/hotkey-router/blob/main/LICENSE) and [ADDITIONAL_TERMS.md](https://github.com/iWhatty/hotkey-router/blob/main/ADDITIONAL_TERMS.md). Commercial AI/model-training use requires compliance with those terms or a separate WATT3D license. © WATT3D.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "Machine-readable companion to docs/browser-hotkeys.md. Each combo entry describes who claims the binding and how strongly. Intended for runtime conflict warnings in keyboard-routing libraries (e.g. hotkey-router) and dev-time validation in apps like WebRadar. Update both this file and the markdown together — the markdown is the human source of truth, this file is the machine projection.",
3
3
  "version": {
4
- "generated": "2026-10-15",
4
+ "generated": "2026-10-29",
5
5
  "schema": "1.0",
6
6
  "sources": [
7
7
  "https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly",
@@ -23,7 +23,8 @@
23
23
  "system-text": "Only reserved while a text input has focus (terminal-style cursor controls on macOS).",
24
24
  "compose": "macOS Option+letter types a special character in text inputs. Outside inputs, free for page world.",
25
25
  "os": "Operating system intercepts globally, before any application sees it.",
26
- "devtools-open": "Only relevant when DevTools is already open; outside DevTools it fires normally."
26
+ "devtools-open": "Only relevant when DevTools is already open; outside DevTools it fires normally.",
27
+ "preventable": "The browser's own shortcut, but keydown reaches the page first: a binding with preventDefault() keeps the browser out, and without one the browser acts. Checked with real keys on Windows (docs/notes/key-check-reserved-2026-10-29.md)."
27
28
  },
28
29
  "$keyFormat": "Each combo key uses hotkey-router-compatible syntax: modifiers in canonical order (ctrl|meta|alt|shift) joined by '+', then the key (lowercased letter, or symbolic name). Per-platform tables use the platform's native modifier name — `meta` on macOS = Cmd, `meta` on Windows = Win, `ctrl` on Linux/Windows = the primary modifier.",
29
30
  "platforms": {
@@ -168,27 +169,29 @@
168
169
  "windows": {
169
170
  "browsers": {
170
171
  "firefox": {
171
- "ctrl+a": { "action": "Select all", "severity": "hard" },
172
- "ctrl+b": { "action": "Bookmarks sidebar", "severity": "hard" },
173
- "ctrl+c": { "action": "Copy", "severity": "hard" },
174
- "ctrl+d": { "action": "Bookmark this page", "severity": "hard" },
175
- "ctrl+f": { "action": "Find in page", "severity": "hard" },
176
- "ctrl+g": { "action": "Find next", "severity": "hard" },
177
- "ctrl+h": { "action": "History sidebar", "severity": "hard" },
178
- "ctrl+j": { "action": "Downloads", "severity": "hard" },
179
- "ctrl+l": { "action": "Focus address bar", "severity": "hard" },
172
+ "ctrl+a": { "action": "Select all", "severity": "preventable" },
173
+ "ctrl+b": { "action": "Bookmarks sidebar", "severity": "preventable" },
174
+ "ctrl+c": { "action": "Copy", "severity": "preventable" },
175
+ "ctrl+d": { "action": "Bookmark this page", "severity": "preventable" },
176
+ "ctrl+e": { "action": "Search from page", "severity": "preventable" },
177
+ "ctrl+f": { "action": "Find in page", "severity": "preventable" },
178
+ "ctrl+g": { "action": "Find next", "severity": "preventable" },
179
+ "ctrl+h": { "action": "History sidebar", "severity": "preventable" },
180
+ "ctrl+j": { "action": "Downloads", "severity": "preventable" },
181
+ "ctrl+k": { "action": "Search from page", "severity": "preventable" },
182
+ "ctrl+l": { "action": "Focus address bar", "severity": "preventable" },
180
183
  "ctrl+n": { "action": "New window", "severity": "hard" },
181
- "ctrl+o": { "action": "Open file", "severity": "hard" },
182
- "ctrl+p": { "action": "Print", "severity": "hard" },
183
- "ctrl+r": { "action": "Reload", "severity": "hard" },
184
- "ctrl+s": { "action": "Save page", "severity": "hard" },
184
+ "ctrl+o": { "action": "Open file", "severity": "preventable" },
185
+ "ctrl+p": { "action": "Print", "severity": "preventable" },
186
+ "ctrl+r": { "action": "Reload", "severity": "preventable" },
187
+ "ctrl+s": { "action": "Save page", "severity": "preventable" },
185
188
  "ctrl+t": { "action": "New tab", "severity": "hard" },
186
- "ctrl+u": { "action": "View source", "severity": "hard" },
187
- "ctrl+v": { "action": "Paste", "severity": "hard" },
189
+ "ctrl+u": { "action": "View source", "severity": "preventable" },
190
+ "ctrl+v": { "action": "Paste", "severity": "preventable" },
188
191
  "ctrl+w": { "action": "Close tab", "severity": "hard" },
189
- "ctrl+x": { "action": "Cut", "severity": "hard" },
190
- "ctrl+y": { "action": "Redo", "severity": "hard" },
191
- "ctrl+z": { "action": "Undo", "severity": "hard" },
192
+ "ctrl+x": { "action": "Cut", "severity": "preventable" },
193
+ "ctrl+y": { "action": "Redo", "severity": "preventable" },
194
+ "ctrl+z": { "action": "Undo", "severity": "preventable" },
192
195
  "ctrl+shift+a": { "action": "Add-ons manager", "severity": "hard" },
193
196
  "ctrl+shift+b": { "action": "Bookmarks toolbar", "severity": "hard" },
194
197
  "ctrl+shift+c": { "action": "Inspector (element picker)", "severity": "hard" },
@@ -217,27 +220,27 @@
217
220
  "alt+d": { "action": "Focus address bar", "severity": "hard" }
218
221
  },
219
222
  "chrome": {
220
- "ctrl+a": { "action": "Select all", "severity": "hard" },
221
- "ctrl+c": { "action": "Copy", "severity": "hard" },
222
- "ctrl+d": { "action": "Bookmark this page", "severity": "hard" },
223
- "ctrl+e": { "action": "Search from page", "severity": "hard" },
224
- "ctrl+f": { "action": "Find in page", "severity": "hard" },
225
- "ctrl+g": { "action": "Find next", "severity": "hard" },
226
- "ctrl+h": { "action": "History page", "severity": "hard" },
227
- "ctrl+j": { "action": "Downloads", "severity": "hard" },
228
- "ctrl+k": { "action": "Search from page", "severity": "hard" },
229
- "ctrl+l": { "action": "Focus address bar", "severity": "hard" },
223
+ "ctrl+a": { "action": "Select all", "severity": "preventable" },
224
+ "ctrl+c": { "action": "Copy", "severity": "preventable" },
225
+ "ctrl+d": { "action": "Bookmark this page", "severity": "preventable" },
226
+ "ctrl+e": { "action": "Search from page", "severity": "preventable" },
227
+ "ctrl+f": { "action": "Find in page", "severity": "preventable" },
228
+ "ctrl+g": { "action": "Find next", "severity": "preventable" },
229
+ "ctrl+h": { "action": "History page", "severity": "preventable" },
230
+ "ctrl+j": { "action": "Downloads", "severity": "preventable" },
231
+ "ctrl+k": { "action": "Search from page", "severity": "preventable" },
232
+ "ctrl+l": { "action": "Focus address bar", "severity": "preventable" },
230
233
  "ctrl+n": { "action": "New window", "severity": "hard" },
231
- "ctrl+o": { "action": "Open file", "severity": "hard" },
232
- "ctrl+p": { "action": "Print", "severity": "hard" },
233
- "ctrl+r": { "action": "Reload", "severity": "hard" },
234
- "ctrl+s": { "action": "Save page", "severity": "hard" },
234
+ "ctrl+o": { "action": "Open file", "severity": "preventable" },
235
+ "ctrl+p": { "action": "Print", "severity": "preventable" },
236
+ "ctrl+r": { "action": "Reload", "severity": "preventable" },
237
+ "ctrl+s": { "action": "Save page", "severity": "preventable" },
235
238
  "ctrl+t": { "action": "New tab", "severity": "hard" },
236
- "ctrl+u": { "action": "View source", "severity": "hard" },
237
- "ctrl+v": { "action": "Paste", "severity": "hard" },
239
+ "ctrl+u": { "action": "View source", "severity": "preventable" },
240
+ "ctrl+v": { "action": "Paste", "severity": "preventable" },
238
241
  "ctrl+w": { "action": "Close tab", "severity": "hard" },
239
- "ctrl+x": { "action": "Cut", "severity": "hard" },
240
- "ctrl+z": { "action": "Undo", "severity": "hard" },
242
+ "ctrl+x": { "action": "Cut", "severity": "preventable" },
243
+ "ctrl+z": { "action": "Undo", "severity": "preventable" },
241
244
  "ctrl+shift+b": { "action": "Bookmarks bar toggle", "severity": "hard" },
242
245
  "ctrl+shift+d": { "action": "Bookmark all tabs", "severity": "hard" },
243
246
  "ctrl+shift+g": { "action": "Find previous", "severity": "find-bar-only" },
@@ -254,28 +257,28 @@
254
257
  "alt+f": { "action": "Customize menu (alt)", "severity": "menu-activation" }
255
258
  },
256
259
  "edge": {
257
- "ctrl+a": { "action": "Select all", "severity": "hard" },
258
- "ctrl+c": { "action": "Copy", "severity": "hard" },
259
- "ctrl+d": { "action": "Favorite this page", "severity": "hard" },
260
- "ctrl+e": { "action": "Search from page", "severity": "hard" },
261
- "ctrl+f": { "action": "Find in page", "severity": "hard" },
262
- "ctrl+g": { "action": "Find next", "severity": "hard" },
263
- "ctrl+h": { "action": "History", "severity": "hard" },
264
- "ctrl+j": { "action": "Downloads", "severity": "hard" },
265
- "ctrl+k": { "action": "Search from page", "severity": "hard" },
266
- "ctrl+l": { "action": "Focus address bar", "severity": "hard" },
267
- "ctrl+m": { "action": "Mute current tab", "severity": "hard" },
260
+ "ctrl+a": { "action": "Select all", "severity": "preventable" },
261
+ "ctrl+c": { "action": "Copy", "severity": "preventable" },
262
+ "ctrl+d": { "action": "Favorite this page", "severity": "preventable" },
263
+ "ctrl+e": { "action": "Search from page", "severity": "preventable" },
264
+ "ctrl+f": { "action": "Find in page", "severity": "preventable" },
265
+ "ctrl+g": { "action": "Find next", "severity": "preventable" },
266
+ "ctrl+h": { "action": "History", "severity": "preventable" },
267
+ "ctrl+j": { "action": "Downloads", "severity": "preventable" },
268
+ "ctrl+k": { "action": "Search from page", "severity": "preventable" },
269
+ "ctrl+l": { "action": "Focus address bar", "severity": "preventable" },
270
+ "ctrl+m": { "action": "Mute current tab", "severity": "preventable" },
268
271
  "ctrl+n": { "action": "New window", "severity": "hard" },
269
- "ctrl+o": { "action": "Open file", "severity": "hard" },
270
- "ctrl+p": { "action": "Print", "severity": "hard" },
271
- "ctrl+r": { "action": "Reload", "severity": "hard" },
272
- "ctrl+s": { "action": "Save page", "severity": "hard" },
272
+ "ctrl+o": { "action": "Open file", "severity": "preventable" },
273
+ "ctrl+p": { "action": "Print", "severity": "preventable" },
274
+ "ctrl+r": { "action": "Reload", "severity": "preventable" },
275
+ "ctrl+s": { "action": "Save page", "severity": "preventable" },
273
276
  "ctrl+t": { "action": "New tab", "severity": "hard" },
274
- "ctrl+u": { "action": "View source", "severity": "hard" },
275
- "ctrl+v": { "action": "Paste", "severity": "hard" },
277
+ "ctrl+u": { "action": "View source", "severity": "preventable" },
278
+ "ctrl+v": { "action": "Paste", "severity": "preventable" },
276
279
  "ctrl+w": { "action": "Close tab", "severity": "hard" },
277
- "ctrl+x": { "action": "Cut", "severity": "hard" },
278
- "ctrl+z": { "action": "Undo", "severity": "hard" },
280
+ "ctrl+x": { "action": "Cut", "severity": "preventable" },
281
+ "ctrl+z": { "action": "Undo", "severity": "preventable" },
279
282
  "ctrl+shift+b": { "action": "Favorites bar toggle", "severity": "hard" },
280
283
  "ctrl+shift+d": { "action": "Bookmark all tabs in folder", "severity": "hard" },
281
284
  "ctrl+shift+e": { "action": "Search in sidebar", "severity": "hard" },
package/dist/auto.js CHANGED
@@ -1,4 +1,4 @@
1
- // hotkey-router v0.4.1 | SEE LICENSE IN LICENSE
1
+ // hotkey-router v0.5.1 | SEE LICENSE IN LICENSE
2
2
 
3
3
 
4
4
  // auto.js
package/dist/auto.min.js CHANGED
@@ -1,3 +1,3 @@
1
- // hotkey-router v0.4.1 | SEE LICENSE IN LICENSE
1
+ // hotkey-router v0.5.1 | SEE LICENSE IN LICENSE
2
2
 
3
- function J(t){return t?/Chrome ?OS|CrOS/i.test(t)?"chromeos":/Mac|iPhone|iPad|iPod/i.test(t)?"mac":/Win/i.test(t)?"windows":/Linux|X11/i.test(t)?"linux":null:null}function E(t=typeof navigator<"u"?navigator:null,{chromeos:e=!1}={}){if(!t)return null;let r=t.userAgent||"",i=(/\bCrOS\b/.test(r)?"chromeos":null)||J(t.userAgentData?.platform)||J(t.platform)||(/Mac OS X/i.test(r)?"mac":/Windows/i.test(r)?"windows":/Linux|X11/i.test(r)?"linux":null);return i==="chromeos"&&!e?"linux":i}function tt(t=typeof navigator<"u"?navigator:null){if(!t)return null;let e=t.userAgent||"";return/Edg\//.test(e)?"edge":/Firefox/.test(e)?"firefox":/Chrome/.test(e)?"chrome":/Safari/.test(e)?"safari":null}var Et={mac:"macOS",windows:"Windows",linux:"Linux",chromeos:"ChromeOS"};function et(t){return Et[t]||t}var At=E(),rt=new Set(["ctrl","shift","alt","meta","mod"]),Pt=new Map([["^","ctrl"],["!","alt"],["+","shift"],["#","meta"]]),it=Object.freeze({esc:"escape",escape:"escape",space:" ",spacebar:" ",enter:"enter",return:"enter",del:"delete",delete:"delete",backspace:"backspace",tab:"tab",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",home:"home",end:"end",pageup:"pageup",pagedown:"pagedown",pgup:"pageup",pgdn:"pagedown",cmd:"meta",command:"meta",win:"meta",meta:"meta",control:"ctrl",ctrl:"ctrl",option:"alt",opt:"alt",alt:"alt",shift:"shift","\u2318":"meta","\u2303":"ctrl","\u2325":"alt","\u21E7":"shift",mod:"mod",plus:"+"});function P(t){let e=String(t??"");if(e===" ")return" ";let i=e.trim().toLowerCase();return it[i]??i}function Tt(t){return rt.has(P(t))}var Ft=/(^|\+)code:([A-Za-z][A-Za-z0-9_]*)/;function ot(t,{platform:e=At}={}){let r=String(t||"").trim(),i=null,a=p=>{i=i||`Invalid hotkey "${t}": ${p}`},d=/\s+up$/i.test(r),y=d?r.replace(/\s+up$/i,"").trim():r,n={ctrl:!1,shift:!1,alt:!1,meta:!1,key:null,code:null,bareModifier:null},w=p=>{p==="mod"?n[e==="mac"?"meta":"ctrl"]=!0:n[p]=!0},g=y;for(;g.length;){let p=Pt.get(g[0])??null;if(!p)break;w(p),g=g.slice(1).trimStart()}let x=g.match(/code:[A-Za-z][A-Za-z0-9_]*/g);x&&x.length>1&&a(`multiple code: tokens not supported (got ${x.length}).`);let L=null,F=g.replace(Ft,(p,S,j)=>(L=j,S+"__code__")).toLowerCase(),R=F.split("+").map(p=>p.trim()),N=R.filter(Boolean),$=R.some(p=>p==="")&&F.includes("++");if(!$){let p=!1;for(let S of N)Tt(S)?p&&a('modifiers must come before the base key (e.g. "ctrl+k", not "k+ctrl")'):p=!0}for(let p of N){if(p==="__code__"){n.code=L;continue}let S=it[p]??p;rt.has(S)?w(S):n.key=P(S)}if(!n.key&&!n.code&&$&&(n.key="+"),!n.key&&!n.code){let p=(n.ctrl?1:0)+(n.shift?1:0)+(n.alt?1:0)+(n.meta?1:0);p===1?n.bareModifier=n.ctrl?"ctrl":n.shift?"shift":n.alt?"alt":"meta":p>1?a('multi-modifier bare bindings not supported. Add a base key (e.g. "ctrl+alt+x").'):i=i||`Invalid hotkey "${t}" (missing base key)`}return{combo:n,type:d?"keyup":"keydown",raw:t,error:i}}function T(t,e){let{combo:r,type:i,raw:a,error:d}=ot(t,e);if(d)throw new Error(d);return{combo:r,type:i,raw:a}}var Kt={",":["<","Comma"],".":[">","Period"],"/":["?","Slash"],";":[":","Semicolon"],"'":['"',"Quote"],"[":["{","BracketLeft"],"]":["}","BracketRight"],"\\":["|","Backslash"],"-":["_","Minus"],"=":["+","Equal"],"`":["~","Backquote"]};function at(t){let{combo:e,type:r,error:i}=ot(t);if(i||!e.shift||e.code)return null;let a=Kt[e.key];if(!a)return null;let[d,y]=a,w=String(t).trim().replace(/\s+up$/i,"").slice(0,-1)+"code:"+y+(r==="keyup"?" up":"");return{message:`"${t}" never fires on US layouts: Shift turns "${e.key}" into "${d}". Bind "${w}" instead.`,suggestion:w}}var W={".":"period",",":"comma",";":"semicolon","'":"quote","/":"slash","\\":"backslash","[":"bracketleft","]":"bracketright","-":"minus","=":"equal","`":"backquote"," ":"space","+":"equal"};function Ot(t){if(!t)return null;let e=/^Key([A-Za-z])$/.exec(t);if(e)return e[1].toLowerCase();let r=/^(?:Digit|Numpad)(\d)$/.exec(t);return r?r[1]:t.toLowerCase()}function Rt(t){if(t==null||t==="")return null;if(W[t])return W[t];let e=P(t);return W[e]||e||null}function nt(t){if(!t||t.bareModifier)return null;let e=t.code?Ot(t.code):Rt(t.key);if(!e)return null;let r=[];return t.ctrl&&r.push("ctrl"),t.meta&&r.push("meta"),t.alt&&r.push("alt"),t.shift&&r.push("shift"),r.push(e),r.join("+")}function O(t,e,r,i){return t.addEventListener(e,r,i),()=>t.removeEventListener(e,r,i)}var Bt=E(),q=Object.freeze({Alt:"alt",AltGraph:"alt",Control:"ctrl",Shift:"shift",Meta:"meta",OS:"meta"}),st=new Set;function z({ctrl:t,shift:e,alt:r,meta:i,key:a,code:d,bareModifier:y}){if(y)return`__bare__:${y}`;let n="";return t&&(n+="ctrl+"),e&&(n+="shift+"),r&&(n+="alt+"),i&&(n+="meta+"),d?n+"code:"+d:n?n+a:a}function Mt(t){let e=q[t.key];return e?`__bare__:${e}`:z({ctrl:t.ctrlKey,shift:t.shiftKey,alt:t.altKey,meta:t.metaKey,key:P(t.key)})}function Dt(t){if(!t.code)return null;let e="";return t.ctrlKey&&(e+="ctrl+"),t.shiftKey&&(e+="shift+"),t.altKey&&(e+="alt+"),t.metaKey&&(e+="meta+"),e+"code:"+t.code}var Lt=new Set(["checkbox","radio","range","color","file","button","submit","reset","image"]);function Nt(t){let e=t?.composedPath?.();if(e?.length)return e;let r=[];for(let i=t?.target;i;i=i.parentNode||i.host)r.push(i);return r}function $t(t,e){let r=Nt(t),i=r[0];if(!i)return null;let a=String(i.tagName||"").toUpperCase();if(i.isContentEditable||a==="TEXTAREA"||a==="SELECT"||i.getAttribute?.("role")==="textbox")return"text";if(a==="INPUT"){if(e==="all")return"text";let d=String(i.getAttribute?.("type")||"text").toLowerCase();return Lt.has(d)?"control":"text"}if(e==="text"){for(let d of r)if(String(d.tagName||"").toUpperCase()==="BUTTON"||d.getAttribute?.("role")==="button")return"control"}return null}function _t(t){return!!((t.ctrlKey||t.altKey||t.metaKey)&&!q[t.key])}function ct(t){if(t==="all"||t==="text")return t;if(typeof t=="string")throw new TypeError(`hotkeys.ignoreInput() expects true, false, 'all' or 'text', got "${t}"`);return t?"all":null}function It(t,e){let r=e?{...e}:{};return t==="keydown"&&r.repeat==null&&(r.repeat=!1),r.priority==null&&(r.priority=0),r}function lt(t){let e=null;for(let r of t)e?(r.options.priority>e.options.priority||r.options.priority===e.options.priority&&r.id>e.id)&&(e=r):e=r;return e}function zt(t){return!!(t.ctrlKey&&t.altKey&&typeof t.getModifierState=="function"&&t.getModifierState("AltGraph")&&typeof t.key=="string"&&t.key.length===1)}function ft(t){return!!(t.isComposing||t.keyCode===229)}var jt=/^(?!\p{Script=Latin})\p{L}$/u;function Ht(t){if(!(t.ctrlKey||t.metaKey)||t.altKey||ft(t)||typeof t.getModifierState=="function"&&t.getModifierState("AltGraph"))return null;let e=/^Key([A-Z])$/.exec(t.code||"");return!e||typeof t.key!="string"||!jt.test(t.key)?null:z({ctrl:t.ctrlKey,shift:t.shiftKey,alt:!1,meta:t.metaKey,key:e[1].toLowerCase()})}var Ut={ctrl:"Control",shift:"Shift",alt:"Alt",meta:"Meta"},ht={Period:".",Comma:",",Semicolon:";",Quote:"'",Slash:"/",Backslash:"\\",BracketLeft:"[",BracketRight:"]",Minus:"-",Equal:"=",Backquote:"`",Space:" ",Enter:"Enter",NumpadEnter:"Enter",Tab:"Tab",Escape:"Escape",Backspace:"Backspace",Delete:"Delete",Insert:"Insert",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},I={},dt;for(let[t,e]of Object.entries(ht))I[dt=P(e)]??(I[dt]=t);function Wt(t){if(!t)return null;let e=/^Key([A-Z])$/.exec(t);if(e)return e[1].toLowerCase();let r=/^(?:Digit|Numpad)(\d)$/.exec(t);return r?r[1]:/^F\d{1,2}$/.test(t)?t:ht[t]??null}function qt(t){return t?/^[a-z]$/.test(t)?"Key"+t.toUpperCase():/^\d$/.test(t)?"Digit"+t:/^f\d{1,2}$/.test(t)?t.toUpperCase():I[t]??null:null}function ut(t,{physical:e=!0,useMod:r=!1,platform:i=Bt}={}){if(!t||q[t.key])return null;let a=[],d=i==="mac";if(r&&(d?t.metaKey:t.ctrlKey)&&a.push("mod"),t.ctrlKey&&!(r&&!d)&&a.push("ctrl"),t.metaKey&&!(r&&d)&&a.push("meta"),t.altKey&&a.push("alt"),t.shiftKey&&a.push("shift"),e&&t.code)a.push(`code:${t.code}`);else{let y=P(t.key);if(!y)return null;a.push(y===" "?"space":y)}return a.join("+")}function yt({target:t=typeof window<"u"?window:null,capture:e=!1,ignoreInput:r=!0}={}){let i=ct(r),a=t,d=e,y=[],n=new Map,w=new Map,g=new Map,x=!1,L=1;function G(o,l){let c=n.get(o);c||(c=new Map,n.set(o,c));let s=c.get(l);return s||(s=[],c.set(l,s)),s}function F(o){let l=g.get(o);if(!l)return!1;let{comboStr:c,type:s}=l,h=n.get(c),f=h?.get(s);if(!f?.length)return g.delete(o),!1;let u=f.filter(m=>m.id!==o);return u.length?h.set(s,u):h.delete(s),h.size||n.delete(c),g.delete(o),!0}function R(o,l,c=null,s={}){let{combo:h,type:f,raw:u}=T(o),m=z(h),b=It(f,s),k={id:L++,comboStr:m,type:f,combo:h,handler:l,plugin:c,raw:u,options:b};G(m,f).push(k),g.set(k.id,{comboStr:m,type:f});let C=`${m} ${f}`;if(!st.has(C)){let A=at(o);A&&(st.add(C),console.warn(`[hotkey-router] ${A.message}`))}if(y.length)for(let A of y)try{A({combo:h,raw:u,options:b,plugin:c,id:k.id})}catch(_){console.error("[hotkey-router] onBind hook threw:",_)}let v=()=>F(k.id);return v.id=k.id,v.hotkey=u,v}function N(o){if(typeof o!="function")throw new TypeError("hotkeys.onBind(hook) expects a function");return y.push(o),()=>{y=y.filter(l=>l!==o)}}function $(o,l){let{combo:c,type:s}=T(o),h=z(c),f=n.get(h);if(!f)return;let u=f.get(s);if(u?.length){if(l){let m=[];for(let b of u)b.handler===l?g.delete(b.id):m.push(b);m.length?f.set(s,m):f.delete(s)}else{for(let m of u)g.delete(m.id);f.delete(s)}f.size||n.delete(h)}}function p(o,l){if(w.has(o))throw new Error(`Plugin "${o}" already registered`);let c=Object.entries(l);for(let[h]of c)T(h);let s=[];for(let[h,f]of c){let[u,m]=Array.isArray(f)?f:[f,{}],b=R(h,u,o,m);s.push(b.id)}return w.set(o,s),()=>S(o)}function S(o){let l=w.get(o);if(l){for(let c of l)F(c);w.delete(o)}}function j(){x=!0}function bt(){x=!1}function kt(o=!0){i=ct(o)}function St(o){a=o}function Z(o,l,c){let s={altGraphChar:zt(o),composing:ft(o),focus:i&&$t(o,i),chord:_t(o)},h=[],f=new Set;for(let u of[Mt(o),Dt(o)])!u||f.has(u)||(f.add(u),Q(h,u,o,l,c,s));if(!h.length){let u=Ht(o);u&&!f.has(u)&&Q(h,u,o,l,c,s)}return h}function Q(o,l,c,s,h,{altGraphChar:f,composing:u,focus:m,chord:b}){let k=n.get(l)?.get(s);if(k?.length)for(let C of k){let v=C.options;h==="capture"&&!v.capture||h==="bubble"&&v.capture||f&&!v.altGraph||u&&!v.composing||m&&!(m==="control"&&b)&&!v.allowIn?.(c)||s==="keydown"&&v.repeat===!1&&c.repeat||v.when&&v.when(c)===!1||o.push(C)}}function X(o,l){let c=o.options;c.preventDefault&&l.preventDefault(),c.stopImmediatePropagation?l.stopImmediatePropagation():c.stopPropagation&&l.stopPropagation();try{o.handler(l)}finally{c.once&&F(o.id)}}function K(o,l="all"){return c=>{if(x)return;let s=Z(c,o,l);s.length&&X(lt(s),c)}}let B=null,M=null,H=null,U=null;function xt({target:o=a,capture:l=d}={}){if(!o)throw new Error("hotkeys.init() requires a target (e.g. window)");if((B||M)&&Y(),l){B=O(o,"keydown",K("keydown"),{capture:!0}),M=O(o,"keyup",K("keyup"),{capture:!0});return}B=O(o,"keydown",K("keydown","bubble"),{capture:!1}),M=O(o,"keyup",K("keyup","bubble"),{capture:!1}),H=O(o,"keydown",K("keydown","capture"),{capture:!0}),U=O(o,"keyup",K("keyup","capture"),{capture:!0})}function Y(){B?.(),M?.(),H?.(),U?.(),B=null,M=null,H=null,U=null,n.clear(),w.clear(),g.clear()}function Ct(o,{type:l,target:c=null}={}){let{combo:s,type:h}=T(o),f=l||h;if(x)return!1;let u=s.bareModifier?Ut[s.bareModifier]:s.key??Wt(s.code),m=s.bareModifier?null:s.code??qt(s.key),b=!!s.alt,k=!!s.ctrl,C=!!s.shift,v=!!s.meta;s.bareModifier&&f==="keyup"&&(s.bareModifier==="alt"?b=!1:s.bareModifier==="ctrl"?k=!1:s.bareModifier==="shift"?C=!1:s.bareModifier==="meta"&&(v=!1));let A={type:f,key:u,code:m,ctrlKey:k,shiftKey:C,altKey:b,metaKey:v,repeat:!1,isComposing:!1,getModifierState(){return!1},preventDefault(){},stopPropagation(){},stopImmediatePropagation(){},target:c},_=Z(A,f,"all");return _.length?(X(lt(_),A),!0):!1}return{init:xt,destroy:Y,setTarget:St,bind:R,unbind:$,registerPlugin:p,unregisterPlugin:S,onBind:N,pause:j,resume:bt,ignoreInput:kt,trigger:Ct,parseHotkey:T,comboFromEvent:ut,detectPlatform:E}}var pt=yt();typeof window<"u"&&pt.init();var V=pt;var D={$comment:"Machine-readable companion to docs/browser-hotkeys.md. Each combo entry describes who claims the binding and how strongly. Intended for runtime conflict warnings in keyboard-routing libraries (e.g. hotkey-router) and dev-time validation in apps like WebRadar. Update both this file and the markdown together \u2014 the markdown is the human source of truth, this file is the machine projection.",version:{generated:"2026-10-15",schema:"1.0",sources:["https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly","https://firefox-source-docs.mozilla.org/devtools-user/keyboard_shortcuts/index.html","https://support.google.com/chrome/answer/157179","https://developer.chrome.com/docs/devtools/shortcuts","https://support.apple.com/guide/safari/keyboard-shortcuts-and-gestures-cpsh003/mac","https://developer.apple.com/documentation/safari-developer-tools/web-inspector","https://support.microsoft.com/en-us/microsoft-edge/keyboard-shortcuts-in-microsoft-edge-50d3edab-30d9-c7e4-21ce-37fe2713cfad","https://support.apple.com/en-us/102650","https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec","https://help.gnome.org/gnome-help/shell-keyboard-shortcuts.html"]},severityLevels:{hard:"Browser or OS intercepts before page-world keydown fires. preventDefault() can't recover it.","find-bar-only":"Reserved only when the browser's find bar has focus. Fires in page world during normal browsing.","menu-activation":"Win/Linux Alt+letter activates the browser menu bar. Hard to suppress reliably.","system-text":"Only reserved while a text input has focus (terminal-style cursor controls on macOS).",compose:"macOS Option+letter types a special character in text inputs. Outside inputs, free for page world.",os:"Operating system intercepts globally, before any application sees it.","devtools-open":"Only relevant when DevTools is already open; outside DevTools it fires normally."},$keyFormat:"Each combo key uses hotkey-router-compatible syntax: modifiers in canonical order (ctrl|meta|alt|shift) joined by '+', then the key (lowercased letter, or symbolic name). Per-platform tables use the platform's native modifier name \u2014 `meta` on macOS = Cmd, `meta` on Windows = Win, `ctrl` on Linux/Windows = the primary modifier.",platforms:{mac:{browsers:{firefox:{"meta+a":{action:"Select all",severity:"hard"},"meta+b":{action:"Bookmarks sidebar",severity:"hard"},"meta+c":{action:"Copy",severity:"hard"},"meta+d":{action:"Bookmark this page",severity:"hard"},"meta+e":{action:"Search from page",severity:"hard"},"meta+f":{action:"Find in page",severity:"hard"},"meta+g":{action:"Find next",severity:"hard"},"meta+j":{action:"Downloads",severity:"hard"},"meta+l":{action:"Focus address bar",severity:"hard"},"meta+n":{action:"New window",severity:"hard"},"meta+o":{action:"Open file",severity:"hard"},"meta+p":{action:"Print",severity:"hard"},"meta+r":{action:"Reload",severity:"hard"},"meta+s":{action:"Save page",severity:"hard"},"meta+t":{action:"New tab",severity:"hard"},"meta+u":{action:"View source",severity:"hard"},"meta+v":{action:"Paste",severity:"hard"},"meta+w":{action:"Close tab",severity:"hard"},"meta+x":{action:"Cut",severity:"hard"},"meta+y":{action:"Redo",severity:"hard"},"meta+z":{action:"Undo",severity:"hard"},"meta+shift+a":{action:"Add-ons manager",severity:"hard"},"meta+shift+b":{action:"Bookmarks toolbar",severity:"hard"},"meta+shift+c":{action:"Inspector (element picker)",severity:"hard"},"meta+shift+d":{action:"Bookmark all tabs",severity:"hard"},"meta+shift+e":{action:"Network Monitor",severity:"hard"},"meta+shift+f":{action:"Toggle fullscreen",severity:"hard"},"meta+shift+g":{action:"Find previous",severity:"find-bar-only"},"meta+shift+j":{action:"Browser Console",severity:"hard"},"meta+shift+n":{action:"New private window",severity:"hard"},"meta+shift+o":{action:"Bookmarks library",severity:"hard"},"meta+shift+p":{action:"New private window (alt)",severity:"hard"},"meta+shift+q":{action:"Quit (with confirm)",severity:"hard"},"meta+shift+s":{action:"Firefox Screenshot",severity:"hard"},"meta+shift+t":{action:"Reopen closed tab",severity:"hard"},"meta+shift+v":{action:"Paste as plain text",severity:"hard"},"meta+shift+w":{action:"Close window",severity:"hard"},"meta+shift+z":{action:"Redo",severity:"hard"},"meta+alt+c":{action:"Inspector",severity:"hard"},"meta+alt+e":{action:"Network Monitor",severity:"hard"},"meta+alt+i":{action:"DevTools Toolbox",severity:"hard"},"meta+alt+j":{action:"Browser Console",severity:"hard"},"meta+alt+k":{action:"Web Console",severity:"hard"},"meta+alt+m":{action:"Responsive Design Mode",severity:"hard"},"meta+alt+z":{action:"Debugger",severity:"hard"}},chrome:{"meta+a":{action:"Select all",severity:"hard"},"meta+c":{action:"Copy",severity:"hard"},"meta+d":{action:"Bookmark this page",severity:"hard"},"meta+e":{action:"Search selected text",severity:"find-bar-only"},"meta+f":{action:"Find in page",severity:"hard"},"meta+g":{action:"Find next",severity:"hard"},"meta+l":{action:"Focus address bar",severity:"hard"},"meta+n":{action:"New window",severity:"hard"},"meta+o":{action:"Open file",severity:"hard"},"meta+p":{action:"Print",severity:"hard"},"meta+r":{action:"Reload",severity:"hard"},"meta+s":{action:"Save page",severity:"hard"},"meta+t":{action:"New tab",severity:"hard"},"meta+v":{action:"Paste",severity:"hard"},"meta+w":{action:"Close tab",severity:"hard"},"meta+x":{action:"Cut",severity:"hard"},"meta+y":{action:"History page",severity:"hard"},"meta+z":{action:"Undo",severity:"hard"},"meta+shift+b":{action:"Bookmarks bar toggle",severity:"hard"},"meta+shift+c":{action:"DevTools Inspector",severity:"hard"},"meta+shift+d":{action:"Bookmark all tabs",severity:"hard"},"meta+shift+g":{action:"Find previous",severity:"find-bar-only"},"meta+shift+j":{action:"Downloads page",severity:"hard"},"meta+shift+m":{action:"Switch user / guest",severity:"hard"},"meta+shift+n":{action:"New incognito window",severity:"hard"},"meta+shift+r":{action:"Hard reload",severity:"hard"},"meta+shift+t":{action:"Reopen closed tab",severity:"hard"},"meta+shift+v":{action:"Paste as plain text",severity:"hard"},"meta+shift+w":{action:"Close window",severity:"hard"},"meta+shift+z":{action:"Redo",severity:"hard"},"meta+alt+i":{action:"DevTools",severity:"hard"},"meta+alt+j":{action:"DevTools (console)",severity:"hard"},"meta+alt+u":{action:"View source",severity:"hard"}},safari:{"meta+a":{action:"Select all",severity:"hard"},"meta+c":{action:"Copy",severity:"hard"},"meta+d":{action:"Add to Reading List",severity:"hard"},"meta+f":{action:"Find in page",severity:"hard"},"meta+g":{action:"Find next",severity:"hard"},"meta+j":{action:"Downloads",severity:"hard"},"meta+l":{action:"Focus Smart Search",severity:"hard"},"meta+n":{action:"New window",severity:"hard"},"meta+p":{action:"Print",severity:"hard"},"meta+r":{action:"Reload",severity:"hard"},"meta+s":{action:"Save page",severity:"hard"},"meta+t":{action:"New tab",severity:"hard"},"meta+v":{action:"Paste",severity:"hard"},"meta+w":{action:"Close tab",severity:"hard"},"meta+x":{action:"Cut",severity:"hard"},"meta+z":{action:"Undo",severity:"hard"},"meta+shift+c":{action:"Inspector pick element",severity:"hard"},"meta+shift+d":{action:"Add Reading List item",severity:"hard"},"meta+shift+g":{action:"Find previous",severity:"find-bar-only"},"meta+shift+h":{action:"Go to homepage",severity:"hard"},"meta+shift+n":{action:"New private window",severity:"hard"},"meta+shift+r":{action:"Reader mode",severity:"hard"},"meta+shift+t":{action:"Reopen last closed tab",severity:"hard"},"meta+shift+v":{action:"Paste as plain text",severity:"hard"},"meta+shift+w":{action:"Close window",severity:"hard"},"meta+shift+z":{action:"Redo",severity:"hard"},"meta+alt+c":{action:"Web Inspector pick",severity:"hard"},"meta+alt+i":{action:"Web Inspector",severity:"hard"}}},system:{"meta+space":{action:"Spotlight",severity:"os"},"meta+tab":{action:"App switcher",severity:"os"},"meta+h":{action:"Hide app",severity:"os"},"meta+m":{action:"Minimize window",severity:"os"},"meta+q":{action:"Quit app",severity:"os"},"meta+shift+3":{action:"Screenshot full screen",severity:"os"},"meta+shift+4":{action:"Screenshot selection",severity:"os"},"meta+shift+5":{action:"Screen recording tool",severity:"os"},"meta+shift+q":{action:"Log out",severity:"os"},"meta+ctrl+q":{action:"Lock screen",severity:"os"},"meta+ctrl+space":{action:"Character Viewer",severity:"os"},"meta+alt+esc":{action:"Force-quit dialog",severity:"os"},"meta+shift+slash":{action:"Help menu search (Cmd+?)",severity:"os"},"meta+alt+h":{action:"Hide other apps",severity:"os"},"meta+alt+d":{action:"Show or hide the Dock",severity:"os"},"meta+backquote":{action:"Switch windows of the front app",severity:"os"}},noteForLetterCombos:{"alt+a..z":{behavior:"compose",note:"Option+letter types special characters in text inputs (Option+E\u2192\xB4, Option+A\u2192\xE5, Option+F\u2192\u0192). Outside inputs, free for page world."},"ctrl+a..z":{behavior:"system-text",note:"Mac uses Ctrl+letter as terminal-style cursor controls inside text inputs (Ctrl+A=line start, Ctrl+E=line end, Ctrl+K=delete-to-end, etc.). Outside inputs, free for page world."}}},windows:{browsers:{firefox:{"ctrl+a":{action:"Select all",severity:"hard"},"ctrl+b":{action:"Bookmarks sidebar",severity:"hard"},"ctrl+c":{action:"Copy",severity:"hard"},"ctrl+d":{action:"Bookmark this page",severity:"hard"},"ctrl+f":{action:"Find in page",severity:"hard"},"ctrl+g":{action:"Find next",severity:"hard"},"ctrl+h":{action:"History sidebar",severity:"hard"},"ctrl+j":{action:"Downloads",severity:"hard"},"ctrl+l":{action:"Focus address bar",severity:"hard"},"ctrl+n":{action:"New window",severity:"hard"},"ctrl+o":{action:"Open file",severity:"hard"},"ctrl+p":{action:"Print",severity:"hard"},"ctrl+r":{action:"Reload",severity:"hard"},"ctrl+s":{action:"Save page",severity:"hard"},"ctrl+t":{action:"New tab",severity:"hard"},"ctrl+u":{action:"View source",severity:"hard"},"ctrl+v":{action:"Paste",severity:"hard"},"ctrl+w":{action:"Close tab",severity:"hard"},"ctrl+x":{action:"Cut",severity:"hard"},"ctrl+y":{action:"Redo",severity:"hard"},"ctrl+z":{action:"Undo",severity:"hard"},"ctrl+shift+a":{action:"Add-ons manager",severity:"hard"},"ctrl+shift+b":{action:"Bookmarks toolbar",severity:"hard"},"ctrl+shift+c":{action:"Inspector (element picker)",severity:"hard"},"ctrl+shift+d":{action:"Bookmark all tabs",severity:"hard"},"ctrl+shift+e":{action:"Network Monitor",severity:"hard"},"ctrl+shift+g":{action:"Find previous",severity:"find-bar-only"},"ctrl+shift+i":{action:"Developer Tools",severity:"hard"},"ctrl+shift+j":{action:"Browser Console",severity:"hard"},"ctrl+shift+k":{action:"Web Console",severity:"hard"},"ctrl+shift+m":{action:"Responsive Design Mode",severity:"hard"},"ctrl+shift+n":{action:"New private window",severity:"hard"},"ctrl+shift+o":{action:"Bookmarks library",severity:"hard"},"ctrl+shift+p":{action:"New private window (alt)",severity:"hard"},"ctrl+shift+s":{action:"Firefox Screenshot",severity:"hard"},"ctrl+shift+t":{action:"Reopen closed tab",severity:"hard"},"ctrl+shift+v":{action:"Paste as plain text",severity:"hard"},"ctrl+shift+w":{action:"Close window",severity:"hard"},"ctrl+shift+y":{action:"Downloads (alt)",severity:"hard"},"ctrl+shift+z":{action:"Debugger",severity:"hard"},"alt+f":{action:"File menu",severity:"menu-activation"},"alt+e":{action:"Edit menu",severity:"menu-activation"},"alt+v":{action:"View menu",severity:"menu-activation"},"alt+b":{action:"Bookmarks menu",severity:"menu-activation"},"alt+t":{action:"Tools menu",severity:"menu-activation"},"alt+h":{action:"Help menu",severity:"menu-activation"},"alt+d":{action:"Focus address bar",severity:"hard"}},chrome:{"ctrl+a":{action:"Select all",severity:"hard"},"ctrl+c":{action:"Copy",severity:"hard"},"ctrl+d":{action:"Bookmark this page",severity:"hard"},"ctrl+e":{action:"Search from page",severity:"hard"},"ctrl+f":{action:"Find in page",severity:"hard"},"ctrl+g":{action:"Find next",severity:"hard"},"ctrl+h":{action:"History page",severity:"hard"},"ctrl+j":{action:"Downloads",severity:"hard"},"ctrl+k":{action:"Search from page",severity:"hard"},"ctrl+l":{action:"Focus address bar",severity:"hard"},"ctrl+n":{action:"New window",severity:"hard"},"ctrl+o":{action:"Open file",severity:"hard"},"ctrl+p":{action:"Print",severity:"hard"},"ctrl+r":{action:"Reload",severity:"hard"},"ctrl+s":{action:"Save page",severity:"hard"},"ctrl+t":{action:"New tab",severity:"hard"},"ctrl+u":{action:"View source",severity:"hard"},"ctrl+v":{action:"Paste",severity:"hard"},"ctrl+w":{action:"Close tab",severity:"hard"},"ctrl+x":{action:"Cut",severity:"hard"},"ctrl+z":{action:"Undo",severity:"hard"},"ctrl+shift+b":{action:"Bookmarks bar toggle",severity:"hard"},"ctrl+shift+d":{action:"Bookmark all tabs",severity:"hard"},"ctrl+shift+g":{action:"Find previous",severity:"find-bar-only"},"ctrl+shift+i":{action:"DevTools",severity:"hard"},"ctrl+shift+j":{action:"DevTools (console)",severity:"hard"},"ctrl+shift+m":{action:"Switch user / guest",severity:"hard"},"ctrl+shift+n":{action:"Incognito window",severity:"hard"},"ctrl+shift+r":{action:"Hard reload",severity:"hard"},"ctrl+shift+t":{action:"Reopen closed tab",severity:"hard"},"ctrl+shift+v":{action:"Paste as plain text",severity:"hard"},"ctrl+shift+w":{action:"Close window",severity:"hard"},"alt+d":{action:"Focus address bar",severity:"hard"},"alt+e":{action:"Customize menu",severity:"menu-activation"},"alt+f":{action:"Customize menu (alt)",severity:"menu-activation"}},edge:{"ctrl+a":{action:"Select all",severity:"hard"},"ctrl+c":{action:"Copy",severity:"hard"},"ctrl+d":{action:"Favorite this page",severity:"hard"},"ctrl+e":{action:"Search from page",severity:"hard"},"ctrl+f":{action:"Find in page",severity:"hard"},"ctrl+g":{action:"Find next",severity:"hard"},"ctrl+h":{action:"History",severity:"hard"},"ctrl+j":{action:"Downloads",severity:"hard"},"ctrl+k":{action:"Search from page",severity:"hard"},"ctrl+l":{action:"Focus address bar",severity:"hard"},"ctrl+m":{action:"Mute current tab",severity:"hard"},"ctrl+n":{action:"New window",severity:"hard"},"ctrl+o":{action:"Open file",severity:"hard"},"ctrl+p":{action:"Print",severity:"hard"},"ctrl+r":{action:"Reload",severity:"hard"},"ctrl+s":{action:"Save page",severity:"hard"},"ctrl+t":{action:"New tab",severity:"hard"},"ctrl+u":{action:"View source",severity:"hard"},"ctrl+v":{action:"Paste",severity:"hard"},"ctrl+w":{action:"Close tab",severity:"hard"},"ctrl+x":{action:"Cut",severity:"hard"},"ctrl+z":{action:"Undo",severity:"hard"},"ctrl+shift+b":{action:"Favorites bar toggle",severity:"hard"},"ctrl+shift+d":{action:"Bookmark all tabs in folder",severity:"hard"},"ctrl+shift+e":{action:"Search in sidebar",severity:"hard"},"ctrl+shift+g":{action:"Find previous",severity:"find-bar-only"},"ctrl+shift+i":{action:"DevTools",severity:"hard"},"ctrl+shift+j":{action:"DevTools (console)",severity:"hard"},"ctrl+shift+k":{action:"Duplicate tab",severity:"hard"},"ctrl+shift+l":{action:"Paste and search",severity:"hard"},"ctrl+shift+m":{action:"Switch user / guest",severity:"hard"},"ctrl+shift+n":{action:"InPrivate window",severity:"hard"},"ctrl+shift+o":{action:"Open favorites",severity:"hard"},"ctrl+shift+p":{action:"Print (system dialog)",severity:"hard"},"ctrl+shift+r":{action:"Hard reload",severity:"hard"},"ctrl+shift+t":{action:"Reopen closed tab",severity:"hard"},"ctrl+shift+u":{action:"Read Aloud toggle",severity:"hard"},"ctrl+shift+v":{action:"Paste without formatting",severity:"hard"},"ctrl+shift+w":{action:"Close window",severity:"hard"},"ctrl+shift+y":{action:"Collections",severity:"hard"},"alt+d":{action:"Focus address bar",severity:"hard"},"alt+e":{action:"Settings menu",severity:"menu-activation"},"alt+f":{action:"Settings menu (alt)",severity:"menu-activation"},"alt+shift+b":{action:"Focus favorites bar",severity:"hard"},"alt+shift+i":{action:"Send feedback dialog",severity:"hard"},"alt+shift+t":{action:"Focus app bar toolbar",severity:"hard"}}},system:{"meta+a":{action:"Action Center",severity:"os"},"meta+c":{action:"Windows search",severity:"os"},"meta+d":{action:"Show desktop",severity:"os"},"meta+e":{action:"File Explorer",severity:"os"},"meta+g":{action:"Game bar",severity:"os"},"meta+h":{action:"Voice dictation",severity:"os"},"meta+i":{action:"Settings",severity:"os"},"meta+l":{action:"Lock",severity:"os"},"meta+n":{action:"Notification center",severity:"os"},"meta+p":{action:"Project / display mode",severity:"os"},"meta+r":{action:"Run dialog",severity:"os"},"meta+s":{action:"Search",severity:"os"},"meta+v":{action:"Clipboard history",severity:"os"},"meta+w":{action:"Widgets",severity:"os"},"meta+x":{action:"Quick Link menu",severity:"os"},"meta+z":{action:"Snap layouts",severity:"os"},"meta+tab":{action:"Task View",severity:"os"},"meta+shift+s":{action:"Screenshot region",severity:"os"},"ctrl+shift+esc":{action:"Task Manager",severity:"os"},"ctrl+alt+del":{action:"Security screen",severity:"os"},"alt+tab":{action:"Switch windows",severity:"os"},"alt+f4":{action:"Close active window",severity:"os"}}},linux:{browsers:{firefox:"$ref:platforms.windows.browsers.firefox",chrome:"$ref:platforms.windows.browsers.chrome",edge:"$ref:platforms.windows.browsers.edge"},system:{$comment:"GNOME defaults. KDE and other DEs have similar-shaped reservations but vary; this is a conservative baseline.","meta+tab":{action:"Switch windows",severity:"os"},"meta+a":{action:"Show applications",severity:"os"},"meta+l":{action:"Lock screen",severity:"os"},"meta+v":{action:"Notification list",severity:"os"},"alt+tab":{action:"Switch applications",severity:"os"},"alt+esc":{action:"Cycle windows",severity:"os"},"alt+f2":{action:"Run command",severity:"os"},"alt+f4":{action:"Close window",severity:"os"},"ctrl+alt+tab":{action:"Top-bar accessibility switcher",severity:"os"},"ctrl+alt+del":{action:"Power-off dialog",severity:"os"},"ctrl+shift+alt+r":{action:"Toggle screencast recording",severity:"os"}},noteForCtrlAlt:"Some Linux setups map right-Alt (AltGr) to 'compose' for typing accented characters, in which case AltGr+letter is reported as ctrl+alt+letter and types a special character. Avoid the ctrl+alt+letter namespace on Linux."}}};var Gt="1.0",Zt=new Set(["hard","os","menu-activation"]);function Qt(t){let e=String(t).toLowerCase().split("+").map(d=>d.trim()).filter(Boolean);if(!e.length)return"";let r=e[e.length-1],i=new Set(e.slice(0,-1)),a=[];return i.has("ctrl")&&a.push("ctrl"),i.has("meta")&&a.push("meta"),i.has("alt")&&a.push("alt"),i.has("shift")&&a.push("shift"),a.push(r),a.join("+")}function Xt(t,e){if(typeof t!="string"||!t.startsWith("$ref:"))return t;let r=t.slice(5).split("."),i=e;for(let a of r)i=i?.[a];return i}function mt(t){if(!t||typeof t!="object")return null;let e=Object.create(null);for(let[r,i]of Object.entries(t))!i||typeof i!="object"||!("severity"in i)||(e[Qt(r)]=i);return e}function Yt(t){let e={platforms:{}},r=t?.platforms||{};for(let[i,a]of Object.entries(r)){let d={};for(let[y,n]of Object.entries(a.browsers||{}))d[y]=mt(Xt(n,t));e.platforms[i]={browsers:d,system:mt(a.system)}}return e}var vt=D?.version?.schema===Gt,Jt=vt?Yt(D):{platforms:{}},te=nt;function ee(t,{platform:e,browser:r}={}){if(!vt)return null;let i=te(t);if(!i)return null;let a=e&&Jt.platforms[e];if(!a)return null;let y=(r?a.browsers?.[r]:null)?.[i];if(y)return{source:"browser",platform:e,browser:r,lookupKey:i,action:y.action,severity:y.severity};let n=a.system?.[i];return n?{source:"system",platform:e,browser:r,lookupKey:i,action:n.action,severity:n.severity}:null}function wt(t){return Zt.has(t)}function re(t,e){let r=et(t.platform),i=t.source==="browser"?`${t.browser} on ${r}`:r,a=wt(t.severity)?"will not fire":"fires in normal browsing";return`[hotkey-router] "${e}" (${t.lookupKey}) reserved by ${i}: "${t.action}" [${t.severity}] \u2014 ${a}.`}function ie(t,e,r=console){let i=re(t,e);(wt(t.severity)?r.warn:r.info).call(r,i)}function gt(t,e={}){if(!t||typeof t.onBind!="function")throw new TypeError("installReservationWarnings(hotkeys) requires a hotkey-router instance with onBind() (>= v0.2.0)");let r=e.platform!==void 0?e.platform:E(),i=e.browser!==void 0?e.browser:tt(),a=e.console||console;return t.onBind(({combo:d,raw:y,options:n})=>{if(n?.warnOnReserved===!1||!r||!i)return;let w=ee(d,{platform:r,browser:i});w&&ie(w,y,a)})}var me=D?.version?.schema,ve=D?.version?.generated;gt(V);var ke=V;export{ke as default};
3
+ function J(e){return e?/Chrome ?OS|CrOS/i.test(e)?"chromeos":/Mac|iPhone|iPad|iPod/i.test(e)?"mac":/Win/i.test(e)?"windows":/Linux|X11/i.test(e)?"linux":null:null}function E(e=typeof navigator<"u"?navigator:null,{chromeos:t=!1}={}){if(!e)return null;let r=e.userAgent||"",i=(/\bCrOS\b/.test(r)?"chromeos":null)||J(e.userAgentData?.platform)||J(e.platform)||(/Mac OS X/i.test(r)?"mac":/Windows/i.test(r)?"windows":/Linux|X11/i.test(r)?"linux":null);return i==="chromeos"&&!t?"linux":i}function ee(e=typeof navigator<"u"?navigator:null){if(!e)return null;let t=e.userAgent||"";return/Edg\//.test(t)?"edge":/Firefox/.test(t)?"firefox":/Chrome/.test(t)?"chrome":/Safari/.test(t)?"safari":null}var Ee={mac:"macOS",windows:"Windows",linux:"Linux",chromeos:"ChromeOS"};function te(e){return Ee[e]||e}var Ae=E(),re=new Set(["ctrl","shift","alt","meta","mod"]),Pe=new Map([["^","ctrl"],["!","alt"],["+","shift"],["#","meta"]]),ie=Object.freeze({esc:"escape",escape:"escape",space:" ",spacebar:" ",enter:"enter",return:"enter",del:"delete",delete:"delete",backspace:"backspace",tab:"tab",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",home:"home",end:"end",pageup:"pageup",pagedown:"pagedown",pgup:"pageup",pgdn:"pagedown",cmd:"meta",command:"meta",win:"meta",meta:"meta",control:"ctrl",ctrl:"ctrl",option:"alt",opt:"alt",alt:"alt",shift:"shift","\u2318":"meta","\u2303":"ctrl","\u2325":"alt","\u21E7":"shift",mod:"mod",plus:"+"});function P(e){let t=String(e??"");if(t===" ")return" ";let i=t.trim().toLowerCase();return ie[i]??i}function Te(e){return re.has(P(e))}var Fe=/(^|\+)code:([A-Za-z][A-Za-z0-9_]*)/;function oe(e,{platform:t=Ae}={}){let r=String(e||"").trim(),i=null,a=y=>{i=i||`Invalid hotkey "${e}": ${y}`},d=/\s+up$/i.test(r),u=d?r.replace(/\s+up$/i,"").trim():r,n={ctrl:!1,shift:!1,alt:!1,meta:!1,key:null,code:null,bareModifier:null},b=y=>{y==="mod"?n[t==="mac"?"meta":"ctrl"]=!0:n[y]=!0},w=u;for(;w.length;){let y=Pe.get(w[0])??null;if(!y)break;b(y),w=w.slice(1).trimStart()}let x=w.match(/code:[A-Za-z][A-Za-z0-9_]*/g);x&&x.length>1&&a(`multiple code: tokens not supported (got ${x.length}).`);let L=null,F=w.replace(Fe,(y,S,j)=>(L=j,S+"__code__")).toLowerCase(),D=F.split("+").map(y=>y.trim()),N=D.filter(Boolean),$=D.some(y=>y==="")&&F.includes("++");if(!$){let y=!1;for(let S of N)Te(S)?y&&a('modifiers must come before the base key (e.g. "ctrl+k", not "k+ctrl")'):y=!0}for(let y of N){if(y==="__code__"){n.code=L;continue}let S=ie[y]??y;re.has(S)?b(S):n.key=P(S)}if(!n.key&&!n.code&&$&&(n.key="+"),!n.key&&!n.code){let y=(n.ctrl?1:0)+(n.shift?1:0)+(n.alt?1:0)+(n.meta?1:0);y===1?n.bareModifier=n.ctrl?"ctrl":n.shift?"shift":n.alt?"alt":"meta":y>1?a('multi-modifier bare bindings not supported. Add a base key (e.g. "ctrl+alt+x").'):i=i||`Invalid hotkey "${e}" (missing base key)`}return{combo:n,type:d?"keyup":"keydown",raw:e,error:i}}function T(e,t){let{combo:r,type:i,raw:a,error:d}=oe(e,t);if(d)throw new Error(d);return{combo:r,type:i,raw:a}}var Ke={",":["<","Comma"],".":[">","Period"],"/":["?","Slash"],";":[":","Semicolon"],"'":['"',"Quote"],"[":["{","BracketLeft"],"]":["}","BracketRight"],"\\":["|","Backslash"],"-":["_","Minus"],"=":["+","Equal"],"`":["~","Backquote"]};function ae(e){let{combo:t,type:r,error:i}=oe(e);if(i||!t.shift||t.code)return null;let a=Ke[t.key];if(!a)return null;let[d,u]=a,b=String(e).trim().replace(/\s+up$/i,"").slice(0,-1)+"code:"+u+(r==="keyup"?" up":"");return{message:`"${e}" never fires on US layouts: Shift turns "${t.key}" into "${d}". Bind "${b}" instead.`,suggestion:b}}var W={".":"period",",":"comma",";":"semicolon","'":"quote","/":"slash","\\":"backslash","[":"bracketleft","]":"bracketright","-":"minus","=":"equal","`":"backquote"," ":"space","+":"equal"};function Re(e){if(!e)return null;let t=/^Key([A-Za-z])$/.exec(e);if(t)return t[1].toLowerCase();let r=/^(?:Digit|Numpad)(\d)$/.exec(e);return r?r[1]:e.toLowerCase()}function De(e){if(e==null||e==="")return null;if(W[e])return W[e];let t=P(e);return W[t]||t||null}function ne(e){if(!e||e.bareModifier)return null;let t=e.code?Re(e.code):De(e.key);if(!t)return null;let r=[];return e.ctrl&&r.push("ctrl"),e.meta&&r.push("meta"),e.alt&&r.push("alt"),e.shift&&r.push("shift"),r.push(t),r.join("+")}function R(e,t,r,i){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r,i)}var Oe=E(),q=Object.freeze({Alt:"alt",AltGraph:"alt",Control:"ctrl",Shift:"shift",Meta:"meta",OS:"meta"}),se=new Set;function z({ctrl:e,shift:t,alt:r,meta:i,key:a,code:d,bareModifier:u}){if(u)return`__bare__:${u}`;let n="";return e&&(n+="ctrl+"),t&&(n+="shift+"),r&&(n+="alt+"),i&&(n+="meta+"),d?n+"code:"+d:n?n+a:a}function Be(e){let t=q[e.key];return t?`__bare__:${t}`:z({ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey,meta:e.metaKey,key:P(e.key)})}function Me(e){if(!e.code)return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+"code:"+e.code}var Le=new Set(["checkbox","radio","range","color","file","button","submit","reset","image"]);function Ne(e){let t=e?.composedPath?.();if(t?.length)return t;let r=[];for(let i=e?.target;i;i=i.parentNode||i.host)r.push(i);return r}function $e(e,t){let r=Ne(e),i=r[0];if(!i)return null;let a=String(i.tagName||"").toUpperCase();if(i.isContentEditable||a==="TEXTAREA"||a==="SELECT"||i.getAttribute?.("role")==="textbox")return"text";if(a==="INPUT"){if(t==="all")return"text";let d=String(i.getAttribute?.("type")||"text").toLowerCase();return Le.has(d)?"control":"text"}if(t==="text"){for(let d of r)if(String(d.tagName||"").toUpperCase()==="BUTTON"||d.getAttribute?.("role")==="button")return"control"}return null}function _e(e){return!!((e.ctrlKey||e.altKey||e.metaKey)&&!q[e.key])}function ce(e){if(e==="all"||e==="text")return e;if(typeof e=="string")throw new TypeError(`hotkeys.ignoreInput() expects true, false, 'all' or 'text', got "${e}"`);return e?"all":null}function Ie(e,t){let r=t?{...t}:{};return e==="keydown"&&r.repeat==null&&(r.repeat=!1),r.priority==null&&(r.priority=0),r}function le(e){let t=null;for(let r of e)t?(r.options.priority>t.options.priority||r.options.priority===t.options.priority&&r.id>t.id)&&(t=r):t=r;return t}function ze(e){return!!(e.ctrlKey&&e.altKey&&typeof e.getModifierState=="function"&&e.getModifierState("AltGraph")&&typeof e.key=="string"&&e.key.length===1)}function fe(e){return!!(e.isComposing||e.keyCode===229)}var je=/^(?!\p{Script=Latin})\p{L}$/u;function He(e){if(!(e.ctrlKey||e.metaKey)||e.altKey||fe(e)||typeof e.getModifierState=="function"&&e.getModifierState("AltGraph"))return null;let t=/^Key([A-Z])$/.exec(e.code||"");return!t||typeof e.key!="string"||!je.test(e.key)?null:z({ctrl:e.ctrlKey,shift:e.shiftKey,alt:!1,meta:e.metaKey,key:t[1].toLowerCase()})}var Ue={ctrl:"Control",shift:"Shift",alt:"Alt",meta:"Meta"},ue={Period:".",Comma:",",Semicolon:";",Quote:"'",Slash:"/",Backslash:"\\",BracketLeft:"[",BracketRight:"]",Minus:"-",Equal:"=",Backquote:"`",Space:" ",Enter:"Enter",NumpadEnter:"Enter",Tab:"Tab",Escape:"Escape",Backspace:"Backspace",Delete:"Delete",Insert:"Insert",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},I={},de;for(let[e,t]of Object.entries(ue))I[de=P(t)]??(I[de]=e);function We(e){if(!e)return null;let t=/^Key([A-Z])$/.exec(e);if(t)return t[1].toLowerCase();let r=/^(?:Digit|Numpad)(\d)$/.exec(e);return r?r[1]:/^F\d{1,2}$/.test(e)?e:ue[e]??null}function qe(e){return e?/^[a-z]$/.test(e)?"Key"+e.toUpperCase():/^\d$/.test(e)?"Digit"+e:/^f\d{1,2}$/.test(e)?e.toUpperCase():I[e]??null:null}function he(e,{physical:t=!0,useMod:r=!1,platform:i=Oe}={}){if(!e||q[e.key])return null;let a=[],d=i==="mac";if(r&&(d?e.metaKey:e.ctrlKey)&&a.push("mod"),e.ctrlKey&&!(r&&!d)&&a.push("ctrl"),e.metaKey&&!(r&&d)&&a.push("meta"),e.altKey&&a.push("alt"),e.shiftKey&&a.push("shift"),t&&e.code)a.push(`code:${e.code}`);else{let u=P(e.key);if(!u)return null;a.push(u===" "?"space":u)}return a.join("+")}function pe({target:e=typeof window<"u"?window:null,capture:t=!1,ignoreInput:r=!0}={}){let i=ce(r),a=e,d=t,u=[],n=new Map,b=new Map,w=new Map,x=!1,L=1;function G(o,l){let c=n.get(o);c||(c=new Map,n.set(o,c));let s=c.get(l);return s||(s=[],c.set(l,s)),s}function F(o){let l=w.get(o);if(!l)return!1;let{comboStr:c,type:s}=l,h=n.get(c),f=h?.get(s);if(!f?.length)return w.delete(o),!1;let p=f.filter(m=>m.id!==o);return p.length?h.set(s,p):h.delete(s),h.size||n.delete(c),w.delete(o),!0}function D(o,l,c=null,s={}){let{combo:h,type:f,raw:p}=T(o),m=z(h),g=Ie(f,s),k={id:L++,comboStr:m,type:f,combo:h,handler:l,plugin:c,raw:p,options:g};G(m,f).push(k),w.set(k.id,{comboStr:m,type:f});let C=`${m} ${f}`;if(!se.has(C)){let A=ae(o);A&&(se.add(C),console.warn(`[hotkey-router] ${A.message}`))}if(u.length)for(let A of u)try{A({combo:h,raw:p,options:g,plugin:c,id:k.id})}catch(_){console.error("[hotkey-router] onBind hook threw:",_)}let v=()=>F(k.id);return v.id=k.id,v.hotkey=p,v}function N(o){if(typeof o!="function")throw new TypeError("hotkeys.onBind(hook) expects a function");return u.push(o),()=>{u=u.filter(l=>l!==o)}}function $(o,l){let{combo:c,type:s}=T(o),h=z(c),f=n.get(h);if(!f)return;let p=f.get(s);if(p?.length){if(l){let m=[];for(let g of p)g.handler===l?w.delete(g.id):m.push(g);m.length?f.set(s,m):f.delete(s)}else{for(let m of p)w.delete(m.id);f.delete(s)}f.size||n.delete(h)}}function y(o,l){if(b.has(o))throw new Error(`Plugin "${o}" already registered`);let c=Object.entries(l);for(let[h]of c)T(h);let s=[];for(let[h,f]of c){let[p,m]=Array.isArray(f)?f:[f,{}],g=D(h,p,o,m);s.push(g.id)}return b.set(o,s),()=>S(o)}function S(o){let l=b.get(o);if(l){for(let c of l)F(c);b.delete(o)}}function j(){x=!0}function ge(){x=!1}function ke(o=!0){i=ce(o)}function Se(o){a=o}function Z(o,l,c){let s={altGraphChar:ze(o),composing:fe(o),focus:i&&$e(o,i),chord:_e(o)},h=[],f=new Set;for(let p of[Be(o),Me(o)])!p||f.has(p)||(f.add(p),Q(h,p,o,l,c,s));if(!h.length){let p=He(o);p&&!f.has(p)&&Q(h,p,o,l,c,s)}return h}function Q(o,l,c,s,h,{altGraphChar:f,composing:p,focus:m,chord:g}){let k=n.get(l)?.get(s);if(k?.length)for(let C of k){let v=C.options;h==="capture"&&!v.capture||h==="bubble"&&v.capture||f&&!v.altGraph||p&&!v.composing||m&&!(m==="control"&&g)&&!v.allowIn?.(c)||s==="keydown"&&v.repeat===!1&&c.repeat||v.when&&v.when(c)===!1||o.push(C)}}function X(o,l){let c=o.options;c.preventDefault&&l.preventDefault(),c.stopImmediatePropagation?l.stopImmediatePropagation():c.stopPropagation&&l.stopPropagation();try{o.handler(l)}finally{c.once&&F(o.id)}}function K(o,l="all"){return c=>{if(x)return;let s=Z(c,o,l);s.length&&X(le(s),c)}}let O=null,B=null,H=null,U=null;function xe({target:o=a,capture:l=d}={}){if(!o)throw new Error("hotkeys.init() requires a target (e.g. window)");if((O||B)&&Y(),l){O=R(o,"keydown",K("keydown"),{capture:!0}),B=R(o,"keyup",K("keyup"),{capture:!0});return}O=R(o,"keydown",K("keydown","bubble"),{capture:!1}),B=R(o,"keyup",K("keyup","bubble"),{capture:!1}),H=R(o,"keydown",K("keydown","capture"),{capture:!0}),U=R(o,"keyup",K("keyup","capture"),{capture:!0})}function Y(){O?.(),B?.(),H?.(),U?.(),O=null,B=null,H=null,U=null,n.clear(),b.clear(),w.clear()}function Ce(o,{type:l,target:c=null}={}){let{combo:s,type:h}=T(o),f=l||h;if(x)return!1;let p=s.bareModifier?Ue[s.bareModifier]:s.key??We(s.code),m=s.bareModifier?null:s.code??qe(s.key),g=!!s.alt,k=!!s.ctrl,C=!!s.shift,v=!!s.meta;s.bareModifier&&f==="keyup"&&(s.bareModifier==="alt"?g=!1:s.bareModifier==="ctrl"?k=!1:s.bareModifier==="shift"?C=!1:s.bareModifier==="meta"&&(v=!1));let A={type:f,key:p,code:m,ctrlKey:k,shiftKey:C,altKey:g,metaKey:v,repeat:!1,isComposing:!1,getModifierState(){return!1},preventDefault(){},stopPropagation(){},stopImmediatePropagation(){},target:c},_=Z(A,f,"all");return _.length?(X(le(_),A),!0):!1}return{init:xe,destroy:Y,setTarget:Se,bind:D,unbind:$,registerPlugin:y,unregisterPlugin:S,onBind:N,pause:j,resume:ge,ignoreInput:ke,trigger:Ce,parseHotkey:T,comboFromEvent:he,detectPlatform:E}}var ye=pe();typeof window<"u"&&ye.init();var V=ye;var M={$comment:"Machine-readable companion to docs/browser-hotkeys.md. Each combo entry describes who claims the binding and how strongly. Intended for runtime conflict warnings in keyboard-routing libraries (e.g. hotkey-router) and dev-time validation in apps like WebRadar. Update both this file and the markdown together \u2014 the markdown is the human source of truth, this file is the machine projection.",version:{generated:"2026-10-29",schema:"1.0",sources:["https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly","https://firefox-source-docs.mozilla.org/devtools-user/keyboard_shortcuts/index.html","https://support.google.com/chrome/answer/157179","https://developer.chrome.com/docs/devtools/shortcuts","https://support.apple.com/guide/safari/keyboard-shortcuts-and-gestures-cpsh003/mac","https://developer.apple.com/documentation/safari-developer-tools/web-inspector","https://support.microsoft.com/en-us/microsoft-edge/keyboard-shortcuts-in-microsoft-edge-50d3edab-30d9-c7e4-21ce-37fe2713cfad","https://support.apple.com/en-us/102650","https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec","https://help.gnome.org/gnome-help/shell-keyboard-shortcuts.html"]},severityLevels:{hard:"Browser or OS intercepts before page-world keydown fires. preventDefault() can't recover it.","find-bar-only":"Reserved only when the browser's find bar has focus. Fires in page world during normal browsing.","menu-activation":"Win/Linux Alt+letter activates the browser menu bar. Hard to suppress reliably.","system-text":"Only reserved while a text input has focus (terminal-style cursor controls on macOS).",compose:"macOS Option+letter types a special character in text inputs. Outside inputs, free for page world.",os:"Operating system intercepts globally, before any application sees it.","devtools-open":"Only relevant when DevTools is already open; outside DevTools it fires normally.",preventable:"The browser's own shortcut, but keydown reaches the page first: a binding with preventDefault() keeps the browser out, and without one the browser acts. Checked with real keys on Windows (docs/notes/key-check-reserved-2026-10-29.md)."},$keyFormat:"Each combo key uses hotkey-router-compatible syntax: modifiers in canonical order (ctrl|meta|alt|shift) joined by '+', then the key (lowercased letter, or symbolic name). Per-platform tables use the platform's native modifier name \u2014 `meta` on macOS = Cmd, `meta` on Windows = Win, `ctrl` on Linux/Windows = the primary modifier.",platforms:{mac:{browsers:{firefox:{"meta+a":{action:"Select all",severity:"hard"},"meta+b":{action:"Bookmarks sidebar",severity:"hard"},"meta+c":{action:"Copy",severity:"hard"},"meta+d":{action:"Bookmark this page",severity:"hard"},"meta+e":{action:"Search from page",severity:"hard"},"meta+f":{action:"Find in page",severity:"hard"},"meta+g":{action:"Find next",severity:"hard"},"meta+j":{action:"Downloads",severity:"hard"},"meta+l":{action:"Focus address bar",severity:"hard"},"meta+n":{action:"New window",severity:"hard"},"meta+o":{action:"Open file",severity:"hard"},"meta+p":{action:"Print",severity:"hard"},"meta+r":{action:"Reload",severity:"hard"},"meta+s":{action:"Save page",severity:"hard"},"meta+t":{action:"New tab",severity:"hard"},"meta+u":{action:"View source",severity:"hard"},"meta+v":{action:"Paste",severity:"hard"},"meta+w":{action:"Close tab",severity:"hard"},"meta+x":{action:"Cut",severity:"hard"},"meta+y":{action:"Redo",severity:"hard"},"meta+z":{action:"Undo",severity:"hard"},"meta+shift+a":{action:"Add-ons manager",severity:"hard"},"meta+shift+b":{action:"Bookmarks toolbar",severity:"hard"},"meta+shift+c":{action:"Inspector (element picker)",severity:"hard"},"meta+shift+d":{action:"Bookmark all tabs",severity:"hard"},"meta+shift+e":{action:"Network Monitor",severity:"hard"},"meta+shift+f":{action:"Toggle fullscreen",severity:"hard"},"meta+shift+g":{action:"Find previous",severity:"find-bar-only"},"meta+shift+j":{action:"Browser Console",severity:"hard"},"meta+shift+n":{action:"New private window",severity:"hard"},"meta+shift+o":{action:"Bookmarks library",severity:"hard"},"meta+shift+p":{action:"New private window (alt)",severity:"hard"},"meta+shift+q":{action:"Quit (with confirm)",severity:"hard"},"meta+shift+s":{action:"Firefox Screenshot",severity:"hard"},"meta+shift+t":{action:"Reopen closed tab",severity:"hard"},"meta+shift+v":{action:"Paste as plain text",severity:"hard"},"meta+shift+w":{action:"Close window",severity:"hard"},"meta+shift+z":{action:"Redo",severity:"hard"},"meta+alt+c":{action:"Inspector",severity:"hard"},"meta+alt+e":{action:"Network Monitor",severity:"hard"},"meta+alt+i":{action:"DevTools Toolbox",severity:"hard"},"meta+alt+j":{action:"Browser Console",severity:"hard"},"meta+alt+k":{action:"Web Console",severity:"hard"},"meta+alt+m":{action:"Responsive Design Mode",severity:"hard"},"meta+alt+z":{action:"Debugger",severity:"hard"}},chrome:{"meta+a":{action:"Select all",severity:"hard"},"meta+c":{action:"Copy",severity:"hard"},"meta+d":{action:"Bookmark this page",severity:"hard"},"meta+e":{action:"Search selected text",severity:"find-bar-only"},"meta+f":{action:"Find in page",severity:"hard"},"meta+g":{action:"Find next",severity:"hard"},"meta+l":{action:"Focus address bar",severity:"hard"},"meta+n":{action:"New window",severity:"hard"},"meta+o":{action:"Open file",severity:"hard"},"meta+p":{action:"Print",severity:"hard"},"meta+r":{action:"Reload",severity:"hard"},"meta+s":{action:"Save page",severity:"hard"},"meta+t":{action:"New tab",severity:"hard"},"meta+v":{action:"Paste",severity:"hard"},"meta+w":{action:"Close tab",severity:"hard"},"meta+x":{action:"Cut",severity:"hard"},"meta+y":{action:"History page",severity:"hard"},"meta+z":{action:"Undo",severity:"hard"},"meta+shift+b":{action:"Bookmarks bar toggle",severity:"hard"},"meta+shift+c":{action:"DevTools Inspector",severity:"hard"},"meta+shift+d":{action:"Bookmark all tabs",severity:"hard"},"meta+shift+g":{action:"Find previous",severity:"find-bar-only"},"meta+shift+j":{action:"Downloads page",severity:"hard"},"meta+shift+m":{action:"Switch user / guest",severity:"hard"},"meta+shift+n":{action:"New incognito window",severity:"hard"},"meta+shift+r":{action:"Hard reload",severity:"hard"},"meta+shift+t":{action:"Reopen closed tab",severity:"hard"},"meta+shift+v":{action:"Paste as plain text",severity:"hard"},"meta+shift+w":{action:"Close window",severity:"hard"},"meta+shift+z":{action:"Redo",severity:"hard"},"meta+alt+i":{action:"DevTools",severity:"hard"},"meta+alt+j":{action:"DevTools (console)",severity:"hard"},"meta+alt+u":{action:"View source",severity:"hard"}},safari:{"meta+a":{action:"Select all",severity:"hard"},"meta+c":{action:"Copy",severity:"hard"},"meta+d":{action:"Add to Reading List",severity:"hard"},"meta+f":{action:"Find in page",severity:"hard"},"meta+g":{action:"Find next",severity:"hard"},"meta+j":{action:"Downloads",severity:"hard"},"meta+l":{action:"Focus Smart Search",severity:"hard"},"meta+n":{action:"New window",severity:"hard"},"meta+p":{action:"Print",severity:"hard"},"meta+r":{action:"Reload",severity:"hard"},"meta+s":{action:"Save page",severity:"hard"},"meta+t":{action:"New tab",severity:"hard"},"meta+v":{action:"Paste",severity:"hard"},"meta+w":{action:"Close tab",severity:"hard"},"meta+x":{action:"Cut",severity:"hard"},"meta+z":{action:"Undo",severity:"hard"},"meta+shift+c":{action:"Inspector pick element",severity:"hard"},"meta+shift+d":{action:"Add Reading List item",severity:"hard"},"meta+shift+g":{action:"Find previous",severity:"find-bar-only"},"meta+shift+h":{action:"Go to homepage",severity:"hard"},"meta+shift+n":{action:"New private window",severity:"hard"},"meta+shift+r":{action:"Reader mode",severity:"hard"},"meta+shift+t":{action:"Reopen last closed tab",severity:"hard"},"meta+shift+v":{action:"Paste as plain text",severity:"hard"},"meta+shift+w":{action:"Close window",severity:"hard"},"meta+shift+z":{action:"Redo",severity:"hard"},"meta+alt+c":{action:"Web Inspector pick",severity:"hard"},"meta+alt+i":{action:"Web Inspector",severity:"hard"}}},system:{"meta+space":{action:"Spotlight",severity:"os"},"meta+tab":{action:"App switcher",severity:"os"},"meta+h":{action:"Hide app",severity:"os"},"meta+m":{action:"Minimize window",severity:"os"},"meta+q":{action:"Quit app",severity:"os"},"meta+shift+3":{action:"Screenshot full screen",severity:"os"},"meta+shift+4":{action:"Screenshot selection",severity:"os"},"meta+shift+5":{action:"Screen recording tool",severity:"os"},"meta+shift+q":{action:"Log out",severity:"os"},"meta+ctrl+q":{action:"Lock screen",severity:"os"},"meta+ctrl+space":{action:"Character Viewer",severity:"os"},"meta+alt+esc":{action:"Force-quit dialog",severity:"os"},"meta+shift+slash":{action:"Help menu search (Cmd+?)",severity:"os"},"meta+alt+h":{action:"Hide other apps",severity:"os"},"meta+alt+d":{action:"Show or hide the Dock",severity:"os"},"meta+backquote":{action:"Switch windows of the front app",severity:"os"}},noteForLetterCombos:{"alt+a..z":{behavior:"compose",note:"Option+letter types special characters in text inputs (Option+E\u2192\xB4, Option+A\u2192\xE5, Option+F\u2192\u0192). Outside inputs, free for page world."},"ctrl+a..z":{behavior:"system-text",note:"Mac uses Ctrl+letter as terminal-style cursor controls inside text inputs (Ctrl+A=line start, Ctrl+E=line end, Ctrl+K=delete-to-end, etc.). Outside inputs, free for page world."}}},windows:{browsers:{firefox:{"ctrl+a":{action:"Select all",severity:"preventable"},"ctrl+b":{action:"Bookmarks sidebar",severity:"preventable"},"ctrl+c":{action:"Copy",severity:"preventable"},"ctrl+d":{action:"Bookmark this page",severity:"preventable"},"ctrl+e":{action:"Search from page",severity:"preventable"},"ctrl+f":{action:"Find in page",severity:"preventable"},"ctrl+g":{action:"Find next",severity:"preventable"},"ctrl+h":{action:"History sidebar",severity:"preventable"},"ctrl+j":{action:"Downloads",severity:"preventable"},"ctrl+k":{action:"Search from page",severity:"preventable"},"ctrl+l":{action:"Focus address bar",severity:"preventable"},"ctrl+n":{action:"New window",severity:"hard"},"ctrl+o":{action:"Open file",severity:"preventable"},"ctrl+p":{action:"Print",severity:"preventable"},"ctrl+r":{action:"Reload",severity:"preventable"},"ctrl+s":{action:"Save page",severity:"preventable"},"ctrl+t":{action:"New tab",severity:"hard"},"ctrl+u":{action:"View source",severity:"preventable"},"ctrl+v":{action:"Paste",severity:"preventable"},"ctrl+w":{action:"Close tab",severity:"hard"},"ctrl+x":{action:"Cut",severity:"preventable"},"ctrl+y":{action:"Redo",severity:"preventable"},"ctrl+z":{action:"Undo",severity:"preventable"},"ctrl+shift+a":{action:"Add-ons manager",severity:"hard"},"ctrl+shift+b":{action:"Bookmarks toolbar",severity:"hard"},"ctrl+shift+c":{action:"Inspector (element picker)",severity:"hard"},"ctrl+shift+d":{action:"Bookmark all tabs",severity:"hard"},"ctrl+shift+e":{action:"Network Monitor",severity:"hard"},"ctrl+shift+g":{action:"Find previous",severity:"find-bar-only"},"ctrl+shift+i":{action:"Developer Tools",severity:"hard"},"ctrl+shift+j":{action:"Browser Console",severity:"hard"},"ctrl+shift+k":{action:"Web Console",severity:"hard"},"ctrl+shift+m":{action:"Responsive Design Mode",severity:"hard"},"ctrl+shift+n":{action:"New private window",severity:"hard"},"ctrl+shift+o":{action:"Bookmarks library",severity:"hard"},"ctrl+shift+p":{action:"New private window (alt)",severity:"hard"},"ctrl+shift+s":{action:"Firefox Screenshot",severity:"hard"},"ctrl+shift+t":{action:"Reopen closed tab",severity:"hard"},"ctrl+shift+v":{action:"Paste as plain text",severity:"hard"},"ctrl+shift+w":{action:"Close window",severity:"hard"},"ctrl+shift+y":{action:"Downloads (alt)",severity:"hard"},"ctrl+shift+z":{action:"Debugger",severity:"hard"},"alt+f":{action:"File menu",severity:"menu-activation"},"alt+e":{action:"Edit menu",severity:"menu-activation"},"alt+v":{action:"View menu",severity:"menu-activation"},"alt+b":{action:"Bookmarks menu",severity:"menu-activation"},"alt+t":{action:"Tools menu",severity:"menu-activation"},"alt+h":{action:"Help menu",severity:"menu-activation"},"alt+d":{action:"Focus address bar",severity:"hard"}},chrome:{"ctrl+a":{action:"Select all",severity:"preventable"},"ctrl+c":{action:"Copy",severity:"preventable"},"ctrl+d":{action:"Bookmark this page",severity:"preventable"},"ctrl+e":{action:"Search from page",severity:"preventable"},"ctrl+f":{action:"Find in page",severity:"preventable"},"ctrl+g":{action:"Find next",severity:"preventable"},"ctrl+h":{action:"History page",severity:"preventable"},"ctrl+j":{action:"Downloads",severity:"preventable"},"ctrl+k":{action:"Search from page",severity:"preventable"},"ctrl+l":{action:"Focus address bar",severity:"preventable"},"ctrl+n":{action:"New window",severity:"hard"},"ctrl+o":{action:"Open file",severity:"preventable"},"ctrl+p":{action:"Print",severity:"preventable"},"ctrl+r":{action:"Reload",severity:"preventable"},"ctrl+s":{action:"Save page",severity:"preventable"},"ctrl+t":{action:"New tab",severity:"hard"},"ctrl+u":{action:"View source",severity:"preventable"},"ctrl+v":{action:"Paste",severity:"preventable"},"ctrl+w":{action:"Close tab",severity:"hard"},"ctrl+x":{action:"Cut",severity:"preventable"},"ctrl+z":{action:"Undo",severity:"preventable"},"ctrl+shift+b":{action:"Bookmarks bar toggle",severity:"hard"},"ctrl+shift+d":{action:"Bookmark all tabs",severity:"hard"},"ctrl+shift+g":{action:"Find previous",severity:"find-bar-only"},"ctrl+shift+i":{action:"DevTools",severity:"hard"},"ctrl+shift+j":{action:"DevTools (console)",severity:"hard"},"ctrl+shift+m":{action:"Switch user / guest",severity:"hard"},"ctrl+shift+n":{action:"Incognito window",severity:"hard"},"ctrl+shift+r":{action:"Hard reload",severity:"hard"},"ctrl+shift+t":{action:"Reopen closed tab",severity:"hard"},"ctrl+shift+v":{action:"Paste as plain text",severity:"hard"},"ctrl+shift+w":{action:"Close window",severity:"hard"},"alt+d":{action:"Focus address bar",severity:"hard"},"alt+e":{action:"Customize menu",severity:"menu-activation"},"alt+f":{action:"Customize menu (alt)",severity:"menu-activation"}},edge:{"ctrl+a":{action:"Select all",severity:"preventable"},"ctrl+c":{action:"Copy",severity:"preventable"},"ctrl+d":{action:"Favorite this page",severity:"preventable"},"ctrl+e":{action:"Search from page",severity:"preventable"},"ctrl+f":{action:"Find in page",severity:"preventable"},"ctrl+g":{action:"Find next",severity:"preventable"},"ctrl+h":{action:"History",severity:"preventable"},"ctrl+j":{action:"Downloads",severity:"preventable"},"ctrl+k":{action:"Search from page",severity:"preventable"},"ctrl+l":{action:"Focus address bar",severity:"preventable"},"ctrl+m":{action:"Mute current tab",severity:"preventable"},"ctrl+n":{action:"New window",severity:"hard"},"ctrl+o":{action:"Open file",severity:"preventable"},"ctrl+p":{action:"Print",severity:"preventable"},"ctrl+r":{action:"Reload",severity:"preventable"},"ctrl+s":{action:"Save page",severity:"preventable"},"ctrl+t":{action:"New tab",severity:"hard"},"ctrl+u":{action:"View source",severity:"preventable"},"ctrl+v":{action:"Paste",severity:"preventable"},"ctrl+w":{action:"Close tab",severity:"hard"},"ctrl+x":{action:"Cut",severity:"preventable"},"ctrl+z":{action:"Undo",severity:"preventable"},"ctrl+shift+b":{action:"Favorites bar toggle",severity:"hard"},"ctrl+shift+d":{action:"Bookmark all tabs in folder",severity:"hard"},"ctrl+shift+e":{action:"Search in sidebar",severity:"hard"},"ctrl+shift+g":{action:"Find previous",severity:"find-bar-only"},"ctrl+shift+i":{action:"DevTools",severity:"hard"},"ctrl+shift+j":{action:"DevTools (console)",severity:"hard"},"ctrl+shift+k":{action:"Duplicate tab",severity:"hard"},"ctrl+shift+l":{action:"Paste and search",severity:"hard"},"ctrl+shift+m":{action:"Switch user / guest",severity:"hard"},"ctrl+shift+n":{action:"InPrivate window",severity:"hard"},"ctrl+shift+o":{action:"Open favorites",severity:"hard"},"ctrl+shift+p":{action:"Print (system dialog)",severity:"hard"},"ctrl+shift+r":{action:"Hard reload",severity:"hard"},"ctrl+shift+t":{action:"Reopen closed tab",severity:"hard"},"ctrl+shift+u":{action:"Read Aloud toggle",severity:"hard"},"ctrl+shift+v":{action:"Paste without formatting",severity:"hard"},"ctrl+shift+w":{action:"Close window",severity:"hard"},"ctrl+shift+y":{action:"Collections",severity:"hard"},"alt+d":{action:"Focus address bar",severity:"hard"},"alt+e":{action:"Settings menu",severity:"menu-activation"},"alt+f":{action:"Settings menu (alt)",severity:"menu-activation"},"alt+shift+b":{action:"Focus favorites bar",severity:"hard"},"alt+shift+i":{action:"Send feedback dialog",severity:"hard"},"alt+shift+t":{action:"Focus app bar toolbar",severity:"hard"}}},system:{"meta+a":{action:"Action Center",severity:"os"},"meta+c":{action:"Windows search",severity:"os"},"meta+d":{action:"Show desktop",severity:"os"},"meta+e":{action:"File Explorer",severity:"os"},"meta+g":{action:"Game bar",severity:"os"},"meta+h":{action:"Voice dictation",severity:"os"},"meta+i":{action:"Settings",severity:"os"},"meta+l":{action:"Lock",severity:"os"},"meta+n":{action:"Notification center",severity:"os"},"meta+p":{action:"Project / display mode",severity:"os"},"meta+r":{action:"Run dialog",severity:"os"},"meta+s":{action:"Search",severity:"os"},"meta+v":{action:"Clipboard history",severity:"os"},"meta+w":{action:"Widgets",severity:"os"},"meta+x":{action:"Quick Link menu",severity:"os"},"meta+z":{action:"Snap layouts",severity:"os"},"meta+tab":{action:"Task View",severity:"os"},"meta+shift+s":{action:"Screenshot region",severity:"os"},"ctrl+shift+esc":{action:"Task Manager",severity:"os"},"ctrl+alt+del":{action:"Security screen",severity:"os"},"alt+tab":{action:"Switch windows",severity:"os"},"alt+f4":{action:"Close active window",severity:"os"}}},linux:{browsers:{firefox:"$ref:platforms.windows.browsers.firefox",chrome:"$ref:platforms.windows.browsers.chrome",edge:"$ref:platforms.windows.browsers.edge"},system:{$comment:"GNOME defaults. KDE and other DEs have similar-shaped reservations but vary; this is a conservative baseline.","meta+tab":{action:"Switch windows",severity:"os"},"meta+a":{action:"Show applications",severity:"os"},"meta+l":{action:"Lock screen",severity:"os"},"meta+v":{action:"Notification list",severity:"os"},"alt+tab":{action:"Switch applications",severity:"os"},"alt+esc":{action:"Cycle windows",severity:"os"},"alt+f2":{action:"Run command",severity:"os"},"alt+f4":{action:"Close window",severity:"os"},"ctrl+alt+tab":{action:"Top-bar accessibility switcher",severity:"os"},"ctrl+alt+del":{action:"Power-off dialog",severity:"os"},"ctrl+shift+alt+r":{action:"Toggle screencast recording",severity:"os"}},noteForCtrlAlt:"Some Linux setups map right-Alt (AltGr) to 'compose' for typing accented characters, in which case AltGr+letter is reported as ctrl+alt+letter and types a special character. Avoid the ctrl+alt+letter namespace on Linux."}}};var Ge="1.0",Ze=new Set(["hard","os","menu-activation"]);function Qe(e){let t=String(e).toLowerCase().split("+").map(d=>d.trim()).filter(Boolean);if(!t.length)return"";let r=t[t.length-1],i=new Set(t.slice(0,-1)),a=[];return i.has("ctrl")&&a.push("ctrl"),i.has("meta")&&a.push("meta"),i.has("alt")&&a.push("alt"),i.has("shift")&&a.push("shift"),a.push(r),a.join("+")}function Xe(e,t){if(typeof e!="string"||!e.startsWith("$ref:"))return e;let r=e.slice(5).split("."),i=t;for(let a of r)i=i?.[a];return i}function me(e){if(!e||typeof e!="object")return null;let t=Object.create(null);for(let[r,i]of Object.entries(e))!i||typeof i!="object"||!("severity"in i)||(t[Qe(r)]=i);return t}function Ye(e){let t={platforms:{}},r=e?.platforms||{};for(let[i,a]of Object.entries(r)){let d={};for(let[u,n]of Object.entries(a.browsers||{}))d[u]=me(Xe(n,e));t.platforms[i]={browsers:d,system:me(a.system)}}return t}var ve=M?.version?.schema===Ge,Je=ve?Ye(M):{platforms:{}},et=ne;function tt(e,{platform:t,browser:r}={}){if(!ve)return null;let i=et(e);if(!i)return null;let a=t&&Je.platforms[t];if(!a)return null;let u=(r?a.browsers?.[r]:null)?.[i];if(u)return{source:"browser",platform:t,browser:r,lookupKey:i,action:u.action,severity:u.severity};let n=a.system?.[i];return n?{source:"system",platform:t,browser:r,lookupKey:i,action:n.action,severity:n.severity}:null}function be(e){return Ze.has(e)}function rt(e,t,r){let i=te(e.platform),a=e.source==="browser"?`${e.browser} on ${i}`:i,d=be(e.severity)?"will not fire":e.severity==="preventable"?r?.preventDefault?"fires first; preventDefault keeps the browser out":"fires, and the browser acts too; bind with preventDefault: true":"fires in normal browsing";return`[hotkey-router] "${t}" (${e.lookupKey}) reserved by ${a}: "${e.action}" [${e.severity}] \u2014 ${d}.`}function it(e,t,r=console,i){let a=rt(e,t,i);(be(e.severity)||e.severity==="preventable"&&!i?.preventDefault?r.warn:r.info).call(r,a)}function we(e,t={}){if(!e||typeof e.onBind!="function")throw new TypeError("installReservationWarnings(hotkeys) requires a hotkey-router instance with onBind() (>= v0.2.0)");let r=t.platform!==void 0?t.platform:E(),i=t.browser!==void 0?t.browser:ee(),a=t.console||console;return e.onBind(({combo:d,raw:u,options:n})=>{if(n?.warnOnReserved===!1||!r||!i)return;let b=tt(d,{platform:r,browser:i});b&&it(b,u,a,n)})}var mt=M?.version?.schema,vt=M?.version?.generated;we(V);var kt=V;export{kt as default};
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- // hotkey-router v0.4.1 | SEE LICENSE IN LICENSE
1
+ // hotkey-router v0.5.1 | SEE LICENSE IN LICENSE
2
2
 
3
3
 
4
4
  // platform.js
package/dist/format.js CHANGED
@@ -1,4 +1,4 @@
1
- // hotkey-router v0.4.1 | SEE LICENSE IN LICENSE
1
+ // hotkey-router v0.5.1 | SEE LICENSE IN LICENSE
2
2
 
3
3
 
4
4
  // platform.js
@@ -1,4 +1,4 @@
1
- // hotkey-router v0.4.1 | SEE LICENSE IN LICENSE
1
+ // hotkey-router v0.5.1 | SEE LICENSE IN LICENSE
2
2
 
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- // hotkey-router v0.4.1 | SEE LICENSE IN LICENSE
1
+ // hotkey-router v0.5.1 | SEE LICENSE IN LICENSE
2
2
 
3
3
 
4
4
  // hotkey-router.js