MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / isModifierPressed

Function isModifierPressed

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

Source from the content-addressed store, hash-verified

18 * Check if a specific modifier key is currently pressed (synchronous).
19 */
20export function isModifierPressed(modifier: ModifierKey): boolean {
21 if (process.platform !== 'darwin') {
22 return false
23 }
24 try {
25 // eslint-disable-next-line @typescript-eslint/no-require-imports
26 const { isModifierPressed: nativeIsModifierPressed } =
27 require('modifiers-napi') as { isModifierPressed: (m: string) => boolean }
28 return nativeIsModifierPressed(modifier)
29 } catch {
30 return false
31 }
32}

Callers 1

handleEnterFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected