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

Manage AltGr key combinations in windows backends #1088

Open
rcases opened this issue Aug 4, 2024 · 2 comments
Open

Manage AltGr key combinations in windows backends #1088

rcases opened this issue Aug 4, 2024 · 2 comments

Comments

@rcases
Copy link

rcases commented Aug 4, 2024

On my keyboard, the '#' character is generated by the combination 'AltGr'+'3' in the same way that on many European keyboards the '€' symbol is generated by 'AltGr'+'e'
For the reason explained in a previous comment in the code, this combination is prohibited in sokol_imgui.h, line 3132.

image

Commenting out that line makes the problem disappear, although I think a better solution would be to put some mask on the key modifiers in the Windows backend to prevent the "AltGr" modifier from being sent in the SAPP_EVENTTYPE_CHAR event.

@floooh
Copy link
Owner

floooh commented Aug 5, 2024

Hmm, I don't have an immediate idea for a robust solution, but there's a related recent ticket here:

#1079

...the code almost certainly exists because of combinations like Ctrl+X/C/P, so maybe we can just remove the ALT modifier from the mask.

@rcases
Copy link
Author

rcases commented Aug 5, 2024

Modifiers could be removed when ALT and Ctrl are used together.
Look at your WebGL imgui example in Inputs & Focus.
Key events that generate characters (WM_CHAR ) do not transmit modifiers.
Ctrl+X/C/P combinations are supposed to be managed through KeyDown

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

No branches or pull requests

2 participants