@openvanilla/mcbopomofoweb
    Preparing search index...

    Controller class that manages the input method's state and handles keyboard events. This class serves as the main coordinator between different components of the input method, including the UI, language model, and keyboard handler.

    The controller is responsible for:

    • Managing input states (empty, inputting, choosing candidates, etc.)
    • Handling keyboard events and routing them to appropriate handlers
    • Managing candidate selection and display
    • Coordinating between the UI and the language model
    • Handling various input method configurations

    Key features:

    • Supports multiple keyboard layouts (Standard, ETen, Hsu, etc.)
    • Handles both traditional and simplified Chinese input
    • Supports customizable candidate key selection
    • Manages vertical and horizontal candidate window layouts
    • Handles various input states and transitions
    • Supports user phrases and dictionary lookups
    const ui = new InputUI();
    const controller = new InputController(ui);
    controller.setKeyboardLayout("Standard");
    controller.setTraditionalMode(true);
    Index

    Constructors

    Accessors

    Methods

    • Enables or disables the feature that allows repeated punctuation to select a candidate.

      Parameters

      • flag: boolean

        A boolean value indicating whether the feature should be enabled (true) or disabled (false).

      Returns void