Except Event based modules, all other misc module will use built-in hook to interference the key event processing.
Currently, there are following usable hooks to interference with key event processing.
void RegisterPreInputFilter(struct _FcitxInstance* instance, KeyFilterHook) ;
void RegisterPostInputFilter(struct _FcitxInstance* instance, KeyFilterHook);
void RegisterOutputFilter(struct _FcitxInstance* instance, StringFilterHook);
void RegisterHotkeyFilter(struct _FcitxInstance* instance, HotkeyHook);
void RegisterResetInputHook(struct _FcitxInstance* instance, FcitxIMEventHook value);
void RegisterTriggerOnHook(struct _FcitxInstance* instance, FcitxIMEventHook value);
void RegisterTriggerOffHook(struct _FcitxInstance* instance, FcitxIMEventHook value);
void RegisterInputFocusHook(struct _FcitxInstance* instance, FcitxIMEventHook value);
void RegisterInputUnFocusHook(struct _FcitxInstance* instance, FcitxIMEventHook value);
void RegisterUpdateCandidateWordHook(struct _FcitxInstance* instance, FcitxIMEventHook value);
As mentioned in Architecture before, the key event processing is separated into 4 phases. PreInput are called before Input Method's DoInput function. PostInput will be called after Input Method's DoInput function, if the key event doesn't get processed yet.
Hotkey will be processed at last, but it will not be blocked even if input context state is ENG. That's the main difference to PreInput and PostInput. If an addon only have a status need to be toggled, it should use hotkey instead of Input Filter.
All input state will be set to default if ResetInput is called. Reset input is always usable via hotkey escape.