Field Notes
    Preparing search index...

    Class PingInput

    Always-available ping input alongside the active tool: long-press-to-ping plus keyboard/programmatic pings, independent of PingTool.

    PingInput is a passive observer by contract. Its DOM pointer listeners are registered passive: true and it never calls preventDefault, stopPropagation, or captures pointers, so the active tool, panning, and pinch navigation behave exactly as if it were absent (with a pencil active, a still hold pings AND the pencil still draws its dot). It also never renders: hosts feed emissions into their own RemotePingOverlay under a 'self' sender key. Pings are ephemeral — no elements, no undo history, no persisted state, no camera movement.

    The long-press gesture is opt-in via longPressEnabled (hosts whose users would not expect hold-to-ping simply leave it off and keep the keyboard paths). When enabled, a long-press arms on the first pointer down (mouse primary button, touch, or pen), fires after longPressMs at the original press position, and cancels on movement past slopPx, a second pointer (two-finger navigation), or pointer up/cancel/leave. Keyboard support is a capability, not a binding: hosts call pingAtPointer() (last tracked hover position, world-converted at call time) or pingAt(world) from their own shortcut handling.

    Index
    • Subscribes to emitted pings. Listeners must not throw; a throwing listener is isolated so it cannot break input handling or other listeners.

      Parameters

      Returns () => void

    • Pings at the last tracked pointer position (hover moves and presses), world-converted at call time. Returns false when no pointer has been seen yet, the host vetoes, or the rate limit drops the ping.

      Returns boolean