Use jngl::TextInputSession instead. That class ties text input to the lifetime of the field that wants it, so multiple fields (e.g. a dialog opening over a form) don't steal each other's characters, and characters typed while you don't poll for a frame aren't lost.