In the “key” event it has Gotcha that if the event is handled by TextField/TextBox/Webview there are certain things that we have to keep in mind.
I want to use the keyboard for a custom control I want to design. Here I want to catch all the keys.
I am trying to see how to put the keyboard on the screen. I see that the only function is setKeyboardFocus and that function requires a textfield to enable the keyboard. This seemed weird because of the Gotcha because it said “if” the event is handled by these. Now with this function requirment of passing a textField, it seems key events are always handled by these!
Is there any other way to show the keyboard and handle the events from the keyboard without a textfield?
I realize that I can put a textField off the screen and use that to show the keyboard. But I think in that case the textfield will be handling the key events first and I will not get all the key events.
I say this because I see that even though the documentation says “back” key is not handled by textField I am not able to to catch it in my handler when I run it on Android 15. So I don’t want to go through the textField and deal with these complex cases.
I would ideally like to directly handle the keyboard and get all the events directly. Would this be possible in any way?