libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.33k stars 1.73k forks source link

Alt-Gr is broken again. #10047

Open oshaboy opened 2 months ago

oshaboy commented 2 months ago

Hello. I am trying to write a text editor in SDL (don't question me) and I have come to the conclusion that SDL2's TextInput Event doesn't handle Alt-Gr properly.

I tried both ibus and fcitx. On several different Desktop Environments. xkb Alt-Gr works fine. I am running EndeavourOS (ArchLinux based) and I have not tested it on other distros.

I also tried setting SDL_IM_MODULE to ibus and it didn't fix the issue.

I've also found previous posts about the bug being fixed and unfixed every so often.

slouken commented 2 months ago

Can you provide repro steps on what you're doing and what you expect to happen?

oshaboy commented 2 months ago

It's a bit complicated.

So I have a custom m17n layout for Hebrew where Alt-Gr maps to Bidi Controls and the Vav with Holam Haser (Both are weird Unicode details only I care about), I mapped Alt-Gr to Right Alt and then tried typing a character that's on Alt-Gr the event's text field only has the original key not the Alt-Gr modified one.

I should probably try it with layouts that aren't m17n.

oshaboy commented 2 months ago

I don't know of any IME that uses Alt-Gr that isn't xkb or m17n so I have no idea how to test that.