MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / click

Function click

source code/utils/computerUse/executor.ts:540–558  ·  view source on GitHub ↗

* Move, then click. Modifiers are press/release bracketed via withModifiers * — same pattern as Cowork. AppKit computes NSEvent.clickCount from timing * + position proximity, so double/triple click work without setting the * CGEvent clickState field. key() inside withModifiers needs t

(
      x: number,
      y: number,
      button: 'left' | 'right' | 'middle',
      count: 1 | 2 | 3,
      modifiers?: string[],
    )

Source from the content-addressed store, hash-verified

538 * the modifier-less path doesn't.
539 */
540 async click(
541 x: number,
542 y: number,
543 button: 'left' | 'right' | 'middle',
544 count: 1 | 2 | 3,
545 modifiers?: string[],
546 ): Promise<void> {
547 const input = requireComputerUseInput()
548 await moveAndSettle(input, x, y)
549 if (modifiers && modifiers.length > 0) {
550 await drainRunLoop(() =>
551 withModifiers(input, modifiers, () =>
552 input.mouseButton(button, 'click', count),
553 ),
554 )
555 } else {
556 await input.mouseButton(button, 'click', count)
557 }
558 },
559
560 async mouseDown(): Promise<void> {
561 await requireComputerUseInput().mouseButton('left', 'press')

Callers

nothing calls this directly

Calls 4

requireComputerUseInputFunction · 0.85
moveAndSettleFunction · 0.85
drainRunLoopFunction · 0.85
withModifiersFunction · 0.85

Tested by

no test coverage detected