McTibetimWeb - v0.1.0
    Preparing search index...

    Acts as the centralized coordinator for input method operations.

    It manages the underlying input state, translates raw device events using a KeyHandler, mutates state, and updates the InputUI appropriately.

    Index

    Constructors

    Properties

    onError: () => void = ...

    Called when key handling reports an unrecoverable input error.

    Accessors

    Methods

    • Returns display names for keys in the current layout and modifier state.

      Parameters

      • shift: boolean

        Whether the Shift modifier is active.

      • ctrl: boolean

        Whether the Control modifier is active.

      • alt: boolean

        Whether the Alt modifier is active.

      Returns Map<string, string>

      A map from key character to its Tibetan display name.

    • 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.

    • Converts simple keyboard state into an internal Key and handles it.

      Parameters

      • button: string

        The character button pressed.

      • isShift: boolean

        Whether Shift is active.

      • isCtrl: boolean

        Whether Control is active.

      • isAlt: boolean

        Whether Alt is active.

      Returns boolean

      True if the key 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

    • Switches the active keyboard layout to the one with the given identifier.

      Active composition is committed and the controller is reset.

      Parameters

      • id: string

        The layout identifier (e.g. 'wylie').

      Returns void