Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how to handle unicode char events #530

Open
almarklein opened this issue Jun 21, 2024 · 0 comments
Open

Figure out how to handle unicode char events #530

almarklein opened this issue Jun 21, 2024 · 0 comments

Comments

@almarklein
Copy link
Member

Context

The current key events are focused on detecting key presses. They can be used to detect the user writing text, but only for Latin characters. It's not possible to detect a user typing ë or Chinese characters. This has not been a problem, but once we look into gui elements that receive text input, it is.

The solution to this problem should work across all supported GUI backends, so that code that uses it remains portable.

Temporary solution

In #516 this is solved with a new "char" event, that's fed into imgui. This is implemented for Qt and glfw, but not in jupyter_rfb.
This event is not documented at the moment, and we should probably avoid using it for the time being, except for code that uses imgui, but that will be desktop until this issue is resolved.

Technical solution

@panxinmiao has already implemented a way to make this work for glfw and Qt.

A solution for JS would probably involve the input event, maybe via a hidden <div contenteditable=true></div>.

API options

A separate char event as we have now, or maybe it can become part of the current key event?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant