Your top level eventHandler() will get kEventKeyPressed, kEventKeyReleased messages. You’ll have to build your own system from there.
I notice that it provides a keycode. I haven’t used the Playdate keyboard input yet, but if this works like libSDL, you may have to map this to a letter if you want text.
When an arbitrary key is pressed or released in the simulator this function is called with event set to kEventKeyPressed or kEventKeyReleased and the keycode of the key in the arg argument.
Someone said he wanted to port the Lua keyboard to C but not sure if it was released or not.
I thought I read that the mirror app provides key presses as well for accessibility purposes. But I can’t find any reference to this and could be hallucinating.
Update: I tested it in Mirror. It does not pass through keystrokes.
That's a start, however it's important to handle all the language localisation stuff. It's pretty simple for Latin based input, even handling the extra umlauts, accents, etc.
But I can't imagine knowing how to combine say Japanese hiragana input and mapping that to Kanji. Then there's cultures that write right->left, etc. etc. Once you scratch the surface, it's a big can-o-worms.
I guess we could start an open-source input module.
Honestly, I expected there to be a widget/control for this already.