Add meta key to modifier text input (sdl2-compat fix)
Closes #1800
It seems that when meta is pressed with an alphanumeric key, SDL2-compat still generates TEXTINPUT events (unlike native SDL2). This PR makes meta key combinations work again with SDL2-compat.
This resolved the issue
nice. meta key works again
for me on the same old-ish LinuxMint:
it changes something but it's buggy anyways:
-
without: I can't type Meta-( to get [ in SDL2 (ok in ncurses) and Lem says "key not found: Alt-["
-
with the PR: Lem understands it's C-u, so because my "(" is on the 4 key it understands C-u 4.
-
without: I can type Alt-~ + n to get ñ
-
with it: when I type Alt-~ Lem says "Key not found: M-n" and then I press "n" and I do get "ñ".
I thought I tried on standard SDL2, but looks like the one I built wasn't used by Lem and it just used my system one :face_exhaling:
In other words, not suitable to merge.
I think the question is whether it's a bug with SDL2-compat and we should open an issue there, or whether it's something on our end or we can make a hotfix. In the meantime I'll leave this PR up so those on SDL2-compat have a way to deal with it.
Pinging President @cxxxr for his opinion :saluting_face:
Let's deprecated lem-sdl2
If it means anything, I was able to fix the key issue by replacing sdl2-compat with sdl2.
Why was this fix never merged? As far as I can tell it works as intended with sdl2-compat.
But I guess it doesn't matter anymore since sdl2 was deprecated.
I think this PR should be merged, it fixes the issue (I tested on arch linux with and without sdl2-compat). Even though SDL2 is deprecated, if some motivated individual wants to play around with it, we might as well have known working code merged.
perhaps @cxxxr would reconsider this merge?
Indeed, I think merging would be fine.