Add a way for keyboard handler to intercept text from composition events

Android keyboards, and also some key combinations on Mac (e.g. Option-Shift-6 on German keyboard) do not include text information during the event,

So for vim mode to work, we need to know the text inserted by the browser during composition.

Currently it is possible to achieve something like this by using EditorState.changeFilter but this doesn’t work well, because it is not possible to know if the change is coming from browser or generated programmatically, and in some cases cancelling the change leaves editor stuck in waiting for composition mode, ignoring subsequent keypresses.

Would it be possible to add textinput method to keybindings, similar to any, or is there another simpler way for keybindings to work on mobile?

Trying to make key handlers beyond enter, delete, and backspace work on Android virtual keyboards is a hornet’s nest I’m not willing to get into. Input handlers may be a hook you can use to implement something like this in your own code.

Thank you, input handler was exactly what i needed.