API

Function createKeyboardInput

  • Observe keys on a focusable element or a window, independently of camera controls. Does not focus the target, prevent defaults, or install frame callbacks.

    Parameters

    • target: HTMLElement | Window

      The element or window receiving keyboard input.

    Returns KeyboardInput

    Application-owned held-key state; release with disposeKeyboardInput.