#1 2016-11-06 11:34:19

ezze_unlogged
Guest

Quakespasm some key presses are counted twice

I have a weird problem with quakespasm, when I press few keys like "Esc", "~" or "Enter," but not the letters, the keypress is counted twice.
With Esc and ~ the net effect is I cannot open the menu or the console, as it appears for a frame and disappear. Similarly backspace make difficult to write in the console. If I type "quite" and I want do delete the "e" I end up with "qui".

I have no idea what to try or do.. any idea?

#2 2016-11-07 19:47:13

ericw
Member

Re: Quakespasm some key presses are counted twice

This is on Linux? I have seen this bug.. as far as I could tell it's a bug in SDL (library we use in QS).

I forget if this is a bug only with SDL1.2, or SDL2 as well, but I'm pretty sure it is fixed in the latest release - SDL 2.0.5 - which just came out a few weeks ago. Unfortunately, 2.0.5 is only available on bleeding edge distros like Debian sid right now.

So, I don't have a simple answer, but a few ideas:
- try the SDL2 variant of QS if you are using SDL1.2 (the precompiled binaries from http://quakespasm.sourceforge.net/download.htm have both SDL1.2 and SDL2 binaries of QS)
- try building/installing SDL2.0.5 from source if you can do that
- try setting your desktop to use English US keyboard layout if you are using a different layout

#3 2016-11-07 21:15:53

ezze_unlogged
Guest

Re: Quakespasm some key presses are counted twice

Yes, I am in Linux and updating is the first thing I tried. Apparently I am up to date:

% quakespasm-svn
Command line: quakespasm-svn
Found SDL version 2.0.5
Detected 8 CPUs.
Quake 1.09 (c) id Software
GLQuake 1.00 (c) id Software
FitzQuake 0.85 (c) John Fitzgibbons
FitzQuake SDL port (c) SleepwalkR, Baker
QuakeSpasm 0.92.2 (c) Ozkan Sezer, Eric Wasylishen & others

Still, I did not try to recompile SDL2, I will.

#4 2016-11-07 21:27:19

ezze_unlogged
Guest

Re: Quakespasm some key presses are counted twice

Ok, that's was it. Thanks a lot!

However I am a bit confused, I just downloaded the source package, compiled it myself, installed and problem disappeared. The sdl2 version is exactly the same, why compiling it myself should be different than downloading the binary package?

#5 2016-11-08 02:52:03

ericw
Member

Re: Quakespasm some key presses are counted twice

Cool, good to hear!

When compiling SDL2 there are several options to ./configure that affect text input:

  --enable-ime            enable IME support [[default=yes]]
  --enable-ibus           enable IBus support [[default=yes]]
  --enable-fcitx          enable fcitx support [[default=yes]]

so possibly your own build used different options than the packaged version.

Also, there were some recent commits to SDL (after 2.0.5) related to duplicate keys and text input:
https://hg.libsdl.org/SDL/rev/251691cfeaa0
https://hg.libsdl.org/SDL/rev/8b8a45c000f9
so it looks like bugs are still being ironed out.

#6 2016-11-08 12:38:55

ezze_unlogged
Guest

Re: Quakespasm some key presses are counted twice

Good point, the configuration is:

  ../SDL2-$pkgver/configure --prefix=/usr \
    --enable-sdl-dlopen \
    --disable-arts --disable-esd --disable-nas \
    --enable-alsa --enable-pulseaudio-shared \
    --enable-video-wayland \
    --disable-rpath

and I am using ibus, so it is well possible that whomever compiled upstream was not using it (so it got disabled) while I compiling it I got the support.

Thanks a lot. Arcane dimensions, here I come! ;)

Board footer