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

Text input does not support modifier keys other than Alt,Ctrl,Shift,Meta on linux. #2270

Open
godefv opened this issue Feb 7, 2022 · 2 comments

Comments

@godefv
Copy link

godefv commented Feb 7, 2022

I am using the UK extended keyboard layout. So, for example, typing ` then a writes à, typing AltGr+6 then a writes â.
I am also using the compose key. So for example, typing Compose then o then e writes œ.
See https://en.wikipedia.org/wiki/Modifier_key#Accented_characters .

None of these examples work on the TexBox sample, only the unmodified keys are taken into account. Some debugging seems to show that the modifier keys like accents and compose are not implemented. I guess it should be around this file src/cinder/app/linux/AppImplLinuxGlfw.cpp, maybe in extractKeyModifiers() and modifyChar() ?

I volunteer to contribute if needed.

@totalgee
Copy link
Contributor

I have a somewhat related issue. My (custom) solution in one application -- in order to use an ImGui text input widget in Cinder -- is to register my own key down handler (with higher priority than the ImGui key down handler) and have it detect the special key combinations for my (Spanish) keyboard, which use the AltGr key (this is equivalent to Alt+Ctrl+something). It then remaps to the appropriate char and "injects" it to ImGui. This is not for accented characters, in my case, but required just to type regular ASCII things like []{}@#\ etc., that require AltGr on a Spanish keyboard (which, incidentally, is pretty annoying for programming 😉).

Anyhow, this is not a general solution to your problem (or mine), but does illustrate a related "non-US" keyboard issue.

@godefv
Copy link
Author

godefv commented Feb 10, 2022

Oh, I see, the French keyboards are similar. So, this is a more serious issue than I thought.
Thanks for your input !

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

2 participants