Author Topic: Strange delay of control key effectiveness  (Read 389 times)

Offline hairybert

  • Captain
  • ***
  • Posts: 52
    • View Profile
Strange delay of control key effectiveness
« on: October 07, 2024, 11:41:00 am »
I'm on Debian 12 Bookworm, KDE 5, Wayland.
Installed current OXCE from this link
https://openxcom.org/oxce/release/Extended-7.14-ddeea35e9-2024-08-31-bionic-x86_64.7z
Also I'm in XCom Files mod.
I'm using an external USB keyboard + mouse connected to my laptop.

I have the impression that in Ctrl+Mouse click combos, the there is a tiny delay in the activation of the ctrl key.
For example, when I want a soldier to drop a weapon in the equipment screen, I have to do it as Ctrl...tiny delay...left click. Without the tiny delay, the weapon will be selected like from an ordinary left click.
Another example: Ctrl...tiny delay...right click on a weapon will set a red square in the upper right corner of the weapon. Without the tiny delay, I get the yellow square as from a ordinary right click.

In constrast to that, Ctrl+key combos like Ctrl+E for getting the "no experience yet" window works without any delay. Also, using the primary laptop keyboard, the problem disappears [edit: not so sure any more about the latter...].

I'm not sure if this is an OXCE problem or if it comes somewhere from the OS.
Posting it anyway as it is a bit annoying. Maybe someone has an idea / is experiencing the same problem.
« Last Edit: October 07, 2024, 11:45:32 am by hairybert »

Offline psavola

  • Commander
  • *****
  • Posts: 827
    • View Profile
Re: Strange delay of control key effectiveness
« Reply #1 on: October 07, 2024, 11:44:23 am »
Which version of libsdl are you using? Are you using native SDL 1.2 or a compat layer where SDL2 tries to imitate SDL 1.2?

The compat layer has multiple (even bigger) issues *), so if you're using that, try using the original SDL 1.2 libraries.

*) See for example https://github.com/libsdl-org/sdl12-compat/issues/338

Offline hairybert

  • Captain
  • ***
  • Posts: 52
    • View Profile
Re: Strange delay of control key effectiveness
« Reply #2 on: October 07, 2024, 11:53:10 am »
Wow, very fast answer, thank you!!

From the list of installed packages, I think I'm actually using native SDL 1.2

Code: [Select]
$ dpkg -l | grep sdl
ii  libsdl-gfx1.2-5:amd64                         2.0.25-12                            amd64        drawing and graphical effects extension for SDL
ii  libsdl-image1.2:amd64                         1.2.12-13+b2                         amd64        Image loading library for Simple DirectMedia Layer 1.2, libraries
ii  libsdl-mixer1.2:amd64                         1.2.12-17+b3                         amd64        Mixer library for Simple DirectMedia Layer 1.2, libraries
ii  libsdl-net1.2:amd64                           1.2.8-6+b1                           amd64        Network library for Simple DirectMedia Layer 1.2, libraries
ii  libsdl-sound1.2:amd64                         1.0.3-9+b2                           amd64        Sound library for Simple DirectMedia Layer 1.2, libraries
ii  libsdl1.2-dev                                 1.2.15+dfsg2-8                       amd64        Simple DirectMedia Layer development files
ii  libsdl1.2debian:amd64                         1.2.15+dfsg2-8                       amd64        Simple DirectMedia Layer
ii  libsdl1.2debian:i386                          1.2.15+dfsg2-8                       i386         Simple DirectMedia Layer
ii  libsdl2-2.0-0:amd64                           2.26.5+dfsg-1                        amd64        Simple DirectMedia Layer
ii  libsdl2-2.0-0:i386                            2.26.5+dfsg-1

Offline hairybert

  • Captain
  • ***
  • Posts: 52
    • View Profile
Re: Strange delay of control key effectiveness
« Reply #3 on: October 07, 2024, 12:02:32 pm »
Sometimes there is also the following problem which might be related: Going back (for example from the web browser) to the OXCE window via Alt + Tab (cycling through the open windows) sometimes leaves me with an activated Alt key in openXCom, even though the Alt key is not pressed any more.

Offline psavola

  • Commander
  • *****
  • Posts: 827
    • View Profile
Re: Strange delay of control key effectiveness
« Reply #4 on: October 07, 2024, 12:21:29 pm »
Sometimes there is also the following problem which might be related: Going back (for example from the web browser) to the OXCE window via Alt + Tab (cycling through the open windows) sometimes leaves me with an activated Alt key in openXCom, even though the Alt key is not pressed any more.

I've noticed the same thing with Linux (though not sure if it it's ALT or CTRL that gets sometimes triggered when switching windows); this has happened for years now, but I have not found that to be a significant problem, because you can easily get rid of that if it happens.

For what it's worth, I've not noticed significant lagging with keys (except sometimes slugginess with mouse, probably having to do with other processes running on the other screens).
« Last Edit: October 07, 2024, 12:24:34 pm by psavola »