Keyconf: different behavior on Windows and SDL builds

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Keyconf: different behavior on Windows and SDL builds

Post by m8f »

Steps to reproduce:
1. Load GZDoom with repeat-key.pk3 (in attachment). This pk3 contains keyconf with the following lines:

Code: Select all

alias "+repeatpress" "echo press"
alias "-repeatpress" "echo release"
AddMenuKey "I repeat when pressed only on SDL" "+repeatpress"
2. In Options -> Customize Controls, bind "I repeat when pressed only on SDL" key.
3. Press this binded key and hold it for some time.
4. Release the key.

On SDL builds (I checked on GZDoom g3.4.1 - 2018-06-13 23:44:12 +0200 - SDL version, x64, and I have evidence that this happens on Mac too) you get:

Code: Select all

press
press
press
press
press
press
press
press
press
press
press
release
While on Windows builds (I checked on GZDoom 3.3.2 x64 under Wine, but I have evidence that for normal Windows users behavior is the same as for me on Wine):

Code: Select all

press
release
So:
for SDL builds: +command keeps being triggered while key is pressed, and therefore happens many times for one key press
for Windows builds: +command is triggered only once for one key press.

This inconsistency may cause mods to work only on Windows or only on Linux/Mac, or have different behavior depending on the OS.
Attachments
repeat-key.pk3
(288 Bytes) Downloaded 22 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Keyconf: different behavior on Windows and SDL builds

Post by Graf Zahl »

For the record: The Windows behavior is the intended one. A pressed button cannot be pressed again so these messages should not be generated.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Keyconf: different behavior on Windows and SDL builds

Post by _mental_ »

Fixed for Cocoa and SDL.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: Keyconf: different behavior on Windows and SDL builds

Post by m8f »

Wow! _mental_, you're awesome! Many thanks.
Post Reply

Return to “Closed Bugs [GZDoom]”