Neo4j Visualization Library
    Preparing search index...

    Type Alias KeyboardInteractionCallbacks

    Callbacks for the keyboard interaction handler.

    type KeyboardInteractionCallbacks = {
        onCanvasBlur?: ((event: FocusEvent) => void) | boolean;
        onCanvasFocus?: ((event: FocusEvent) => void) | boolean;
        onContextMenu?:
            | (
                (
                    element: Node | Relationship | undefined,
                    event: KeyboardEvent,
                ) => void
            )
            | boolean;
        onKeyDown?:
            | (
                (event: KeyboardEvent, focusedElement?: Node | Relationship) => void
            )
            | boolean;
        onKeyUp?:
            | (
                (event: KeyboardEvent, focusedElement?: Node | Relationship) => void
            )
            | boolean;
        onNodeBlur?: ((node: Node, event: KeyboardEvent) => void) | boolean;
        onNodeFocus?: ((node: Node, event: KeyboardEvent) => void) | boolean;
        onNodeMove?:
            | ((nodes: (Node & Point)[], event: KeyboardEvent) => void)
            | boolean;
        onRelationshipBlur?:
            | ((relationship: Relationship, event: KeyboardEvent) => void)
            | boolean;
        onRelationshipFocus?:
            | ((relationship: Relationship, event: KeyboardEvent) => void)
            | boolean;
    }
    Index
    onCanvasBlur?: ((event: FocusEvent) => void) | boolean

    Called when the NVL canvas container loses DOM focus

    The original focus event.

    onCanvasFocus?: ((event: FocusEvent) => void) | boolean

    Called when the NVL canvas container receives DOM focus

    The original focus event.

    onContextMenu?:
        | (
            (
                element: Node | Relationship | undefined,
                event: KeyboardEvent,
            ) => void
        )
        | boolean

    Called when the context menu key is pressed while the NVL container is focused.

    The focused node or relationship, or undefined if the canvas itself is focused.

    The original keyboard event.

    onKeyDown?:
        | ((event: KeyboardEvent, focusedElement?: Node | Relationship) => void)
        | boolean

    Called when a key is pressed while the NVL container is focused. Fires for all key events, including those handled by the built-in navigation.

    The original keyboard event.

    The currently focused node or relationship, if any.

    onKeyUp?:
        | ((event: KeyboardEvent, focusedElement?: Node | Relationship) => void)
        | boolean

    Called when a key is released while the NVL container is focused

    The original keyboard event.

    The currently focused node or relationship, if any.

    onNodeBlur?: ((node: Node, event: KeyboardEvent) => void) | boolean

    Called when a node loses focus (via keyboard navigation)

    The node that lost focus.

    The original keyboard event that triggered the focus change.

    onNodeFocus?: ((node: Node, event: KeyboardEvent) => void) | boolean

    Called when a node receives focus (via keyboard navigation)

    The node that received focus.

    The original keyboard event that triggered the focus change.

    onNodeMove?: ((nodes: (Node & Point)[], event: KeyboardEvent) => void) | boolean

    Called when node(s) are moved with the keyboard.

    The moved node(s), with their updated positions.

    The original keyboard event.

    onRelationshipBlur?:
        | ((relationship: Relationship, event: KeyboardEvent) => void)
        | boolean

    Called when a relationship loses focus (via keyboard navigation)

    The relationship that lost focus.

    The original keyboard event that triggered the focus change.

    onRelationshipFocus?:
        | ((relationship: Relationship, event: KeyboardEvent) => void)
        | boolean

    Called when a relationship receives focus (via keyboard navigation)

    The relationship that received focus.

    The original keyboard event that triggered the focus change.