Creates a key handler backed by a completer for candidate lookup.
Completer used to refresh candidates from the buffer.
Handles one key against the current state.
The normalized key to handle.
The current input state.
Called with each resulting state transition.
Called when the key is invalid for the current state.
True if the key was consumed by the input method.
Applies input-method key semantics to the current InputState.
KeyHandler is responsible for editing the composing buffer, moving the cursor, navigating candidates, and emitting the next state that InputController should apply.