lem icon indicating copy to clipboard operation
lem copied to clipboard

Add meta key to modifier text input (sdl2-compat fix)

Open jfaz1 opened this issue 9 months ago • 4 comments

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.

jfaz1 avatar May 05 '25 17:05 jfaz1

This resolved the issue

nassir90 avatar May 05 '25 18:05 nassir90

nice. meta key works again

SequentialDesign avatar May 05 '25 22:05 SequentialDesign

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 "ñ".

vindarel avatar May 09 '25 09:05 vindarel

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:

jfaz1 avatar May 09 '25 15:05 jfaz1

Let's deprecated lem-sdl2

cxxxr avatar Aug 10 '25 19:08 cxxxr

If it means anything, I was able to fix the key issue by replacing sdl2-compat with sdl2.

mantacid avatar Aug 22 '25 23:08 mantacid

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.

novemberist avatar Sep 09 '25 19:09 novemberist

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?

ethanxxxl avatar Jan 03 '26 16:01 ethanxxxl

Indeed, I think merging would be fine.

cxxxr avatar Jan 03 '26 17:01 cxxxr