Gets the current input state
Handles the passed keyboard events.
The keyboard event.
If the key is handled.
Resets to empty state.
Sets the candidate keys
The candidate keys, such "123456789".
Sets the number of candidate selection keys.
The number of candidate selection keys to set. Must be between 4 and 15 inclusive.
Sets Chinese conversion on or off.
Sets if the ESC key should clear the entire composing buffer.
If the ESC key should clear the entire composing buffer.
Sets if we want to use half width punctuation.
Use half width punctuation.
Sets keyboard layout.
Keyboard layout. It could be:
The language code for localized messages.
The language code.
Ser if the input method should input uppercase or lowercase letters when users type shift and letter keys.
"lower" or "upper".
Sets if the input method should move cursor after selecting a candidate.
To enable the function or not.
Sets the error handler function for the input controller.
The callback function to handle errors
Help the controller to open a URL.
Sets the callback function that would be called when the a user phrase model is added.
The callback function.
Sets the callback function that would be called when the user phrase model is changed.
The callback function.
Enables or disables the feature that allows repeated punctuation to select a candidate.
A boolean value indicating whether the feature should be enabled (true) or disabled (false).
Sets if we should select the candidate before the cursor or after the cursor.
"after_cursor" or "before_cursor".
Sets if the input controller should use traditional mode or not.
Sets whether to enable cursor movement using 'J' and 'K' keys when the candidate window is visible. When enabled, users can navigate through candidates using these keys similar to vim-style navigation.
True to enable J/K cursor movement, false to disable
Sets the user phrases to the language model.
The map of user phrases.
Sets if we want to use vertical or horizontal candidate window.
Use the vertical candidate window.
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:
Key features:
Example