MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isModifierPressed

Function isModifierPressed

src/utils/modifiers.ts:27–36  ·  view source on GitHub ↗
(modifier: ModifierKey)

Source from the content-addressed store, hash-verified

25 * Check if a specific modifier key is currently pressed (synchronous).
26 */
27export function isModifierPressed(modifier: ModifierKey): boolean {
28 if (process.platform !== 'darwin') {
29 return false
30 }
31 // Dynamic import to avoid loading native module at top level
32 const { isModifierPressed: nativeIsModifierPressed } =
33 // eslint-disable-next-line @typescript-eslint/no-require-imports
34 require('modifiers-napi') as { isModifierPressed: (m: string) => boolean }
35 return nativeIsModifierPressed(modifier)
36}
37

Callers 1

handleEnterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected