I’ve ported a GUI system for Prolog to SDL3. Works great! One of the components is an Emacs clone. The Emacs editor uses Alt-% as shortcut for replace. You can type this as ESC-%, which works fine. Alternatively, on an US keyboard one needs Alt-Shift-5 as the % is Shift-5.
However, on non-US keyboards this will not work. Alt-Shift-5 only produces a SDL_EVENT_KEY_DOWN (and UP) event, not a SDL_EVENT_TEXT_INPUT event as produced by Shift-5 (with the text “%”).
Is there any way I can detect that Alt-% is pressed, regardless of the physical key and other modifiers required to type “%”?