MCPcopy Create free account
hub / github.com/TanStack/hotkeys / resolveModifier

Function resolveModifier

packages/hotkeys/src/constants.ts:153–161  ·  view source on GitHub ↗
(
  modifier: CanonicalModifier | 'Mod',
  platform: 'mac' | 'windows' | 'linux' = detectPlatform(),
)

Source from the content-addressed store, hash-verified

151 * ```
152 */
153export function resolveModifier(
154 modifier: CanonicalModifier | 'Mod',
155 platform: 'mac' | 'windows' | 'linux' = detectPlatform(),
156): CanonicalModifier {
157 if (modifier === 'Mod') {
158 return platform === 'mac' ? 'Meta' : 'Control'
159 }
160 return modifier
161}
162
163/**
164 * Set of all valid letter keys (A-Z).

Callers 2

parseHotkeyFunction · 0.90
rawHotkeyToParsedHotkeyFunction · 0.90

Calls 1

detectPlatformFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…