@tanstack/hotkeys 0.12.0 → 0.12.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.
Files changed (2) hide show
  1. package/dist/_match.js +2 -0
  2. package/package.json +1 -1
package/dist/_match.js CHANGED
@@ -14,6 +14,7 @@ function matchKeyboardEvent(event, hotkey, platform = detectPlatform()) {
14
14
  if (normalized.isComposing && (parsed.code !== void 0 || isPrintableKey(parsed.key))) return noMatch;
15
15
  if (normalized.altGraph && (parsed.ctrl || parsed.alt)) return noMatch;
16
16
  if (parsed.code !== void 0) {
17
+ if (normalized.altGraph) return noMatch;
17
18
  if (!modifiersMatch(normalized, parsed, false)) return noMatch;
18
19
  return normalized.code === parsed.code ? matched("code", 3) : noMatch;
19
20
  }
@@ -21,6 +22,7 @@ function matchKeyboardEvent(event, hotkey, platform = detectPlatform()) {
21
22
  const implicitShift = direct && isPrintableKey(normalized.key) && !/^\p{Letter}$/u.test(normalized.key) && !parsed.shift;
22
23
  if (direct && modifiersMatch(normalized, parsed, implicitShift)) return matched("key", implicitShift ? 2 : 3);
23
24
  if (isAsciiLetter(normalized.key) || isLatinLetter(normalized.key) && normalized.code.startsWith("Key") && !normalized.alt) return noMatch;
25
+ if (normalized.altGraph) return noMatch;
24
26
  if (!modifiersMatch(normalized, parsed, false)) return noMatch;
25
27
  const fallbackKey = codeToLogicalKey(normalized.code);
26
28
  return fallbackKey !== void 0 && keysEqual(fallbackKey, parsed.key) ? matched("fallback", 1) : noMatch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/hotkeys",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Type-safe, framework-agnostic keyboard hotkey management for the browser",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",