@openvanilla/mcfoximmweb
    Preparing search index...

    Coordinates the input method flow.

    InputController receives keyboard input, forwards it to KeyHandler, and applies the resulting InputState transition. It manages three main states: EmptyState when there is no active composition, InputtingState while the user is building text and browsing candidates, and CommittingState when a string should be sent to the host application. Each transition is finalized here so the UI is kept in sync, committed text is emitted at the right time, and the controller returns to EmptyState after a commit or reset.

    Index

    Constructors

    Properties

    onError: () => void = ...

    Called when key handling reports an unrecoverable input error.

    Accessors

    Methods

    • Handles an already translated key input.

      The key is delegated to KeyHandler, and any resulting state transition is applied through this controller.

      Parameters

      • key: Key

        The key to handle.

      Returns boolean

      True if the key was handled.

    • Converts a DOM keyboard event into an internal Key and handles it.

      Parameters

      • event: KeyboardEvent

        The keyboard event.

      Returns boolean

      True if the event was handled.

    • Resets the controller to EmptyState.

      If composition is still active, the current composing buffer is committed before the UI is cleared.

      Returns void

    • Selects a candidate from the current candidate page.

      When the index is valid, the selected candidate is committed and the controller returns to EmptyState.

      Parameters

      • index: number

        The index of the candidate to select.

      Returns void