Interaction
8 pages
-
tool_setActivates a tool of the viewport. -
tool_commitCommits the open session if it can (as Enter does); done is false with no session open. -
tool_cancelCancels the open session (reason 'verb'); done is false with no session open. -
keymap_setReplaces the viewport's key bindings whole. -
targets_setReplaces the viewport's host targets whole: ports anchored to 2D shapes ({ key, kind: 'port', nodeId, portId, side: 'in' | 'out', bind: { shape, anchor }, radiusPx }), tested like the kit's own targets and owned by the resident wire tool. -
input_dispatchFeeds input events through the same router as the DOM, for replay, tests and agents: { type: 'pointer', phase, pointerId, pointerType, x, y, button?, buttons?, modifiers?, pressure?, time }, { type: 'wheel', x, y, dx, dy, modifiers?, time }, { type: 'key', phase, key, code?, modifiers?, repeat?, time }, { type: 'focus', lost }, { type: 'tick', time }. -
get_toolThe active tool of the viewport with its descriptor, the open session (or null) and every tool tool_set can pick. -
get_keymapThe viewport's key bindings and its whole pointer-role table, as keymap_set takes them.