[4fb6b7c] - Inconsistencies with DEFBINDS

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.
User avatar
SanyaWaffles
Posts: 891
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

[4fb6b7c] - Inconsistencies with DEFBINDS

Post by SanyaWaffles »

Hopefully the last of these woes, but this one is a bit tricky to explain.

So before, bindings like 'ctrl' and 'shift' and 'mouse2' worked fine... but now for some reason the bindings aren't working reliably.

I have to use 'lctrl' and 'lshift' or else it doesn't work and defaults to whatever the defaults were.

It seems to also be overriding previous settings as updating the GZDoom build to the latest version seems to result in the settings being overwritten even if I had set up a binding before.

The DEFBINDS in this test.ipk3 was what I was using before.

https://www.dropbox.com/s/h3193g4rsspad ... .ipk3?dl=1

This wouldn't be bad except I'm sure it breaks a bunch of existing projects and setups.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

Here i only see that Ctrl, Alt and Shift can't be bound anymore and when you press the buttons you get the left counterparts in the menu. But then ingame both work as if they were the same. You don't need the custom iwad to get this issue, besides you can't play with the custom iwad (no maps).
About the custom iwad what's the problem? Your sentence is ambiguous. User settings overriden by yours? I don't see that happening with latest devbuild (not SVN :twisted: ).
May be it's unrelated to the second issue but there's an unfinished feature to support multiple binding presets now in GZDoom.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

Before left and right were already the same but now Crtl has been renamed to LCtrl (same for Shift and Alt). Now in theory they are not the same and the tables are correct so RCtrl should appear but it doesn't. This is a spanish keyboard tough.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

Actually there are no events for them in bool GUIWndProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result).

Code: Select all

		if (GetKeyState(VK_SHIFT) & 0x8000)		ev.data3 |= GKM_SHIFT;
		if (GetKeyState(VK_CONTROL) & 0x8000)	ev.data3 |= GKM_CTRL;
		if (GetKeyState(VK_MENU) & 0x8000)		ev.data3 |= GKM_ALT;
And then in d_gui.h:

Code: Select all

enum GUIKeyModifiers
{
	GKM_SHIFT	= 1,
	GKM_CTRL	= 2,
	GKM_ALT		= 4,
	GKM_META	= 8,
	GKM_LBUTTON = 16
};
And then there are more occurrences for both VK_SHIFT and GKM_SHIFT and the others.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by Graf Zahl »

That's GUI input, not game input.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

Yes but i thought you needed to set the keys in the GUI for them to work ingame.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by Graf Zahl »

No, it's totally different interfaces.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

I see. I've found that there's a k_mergekeys cvar used in void FKeyboard::PostKeyEvent(int key, INTBOOL down, bool foreground).
Setting it to false fixes the first issue (right keys can be assigned). It's just a name change actually (Ctrl to LCtrl...). No problem with mouse2 here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by Graf Zahl »

Yes, that one. In the very old days it was impossible to assign anything to the right shift, ctrl and alt keys - they were unconditionally merged, so eventually I added this CVAR, but left the default at what it was before
User avatar
SanyaWaffles
Posts: 891
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by SanyaWaffles »

About the custom iwad what's the problem? Your sentence is ambiguous. User settings overriden by yours? I don't see that happening with latest devbuild (not SVN :twisted: ).
I'm not sure what the confusion is to be frank.

The custom IWAD I've been using has default settings included in it. GIT build 4fb6b7c breaks by making me use LCtrl/LShift. This breaks behavior that's been consistent before recent changes. I cannot tell where it broke, but it was consistent with recent refactorings as it changed behavior.

I can confirm with a fresh build of 8c1db978b that the behavior still exists. It's not respecting my mouse2 bind for some reason.

Here's the ini section for the bindings, thise is inconsistent with the bindings I put included in both the actual IPK3 and minimal test IPK3
Spoiler:
Here's the defbinds in the IPK3:
Spoiler:
So as you can tell, several of the keybinds are not working as expected.

I'm taking this change came about with trying to unify Raze and GZDoom's codebases.

So what should I do? This breaks Daytime Drama 1 for sure as I used a similar binding setup. And I'm sure I'm not alone. This totally breaks the existing setups people have been using for years. I've been using Ctrl/Shift since DEFBINDS became a thing. I feel changing it now is just going to break a massive amount of projects.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

The Ctrl/Shift thing is just a name change to LCrtl/LShift they work the same as before. But without k_mergekeys now you can assign RCrtl/RShift separately, before both left and right keys were the same (due to bad definitions). The mouse2 button gets assigned to altfire when loading your ipk3 but then loading doom2 it's assigned again to whatever it was before. What's the problem here?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by Graf Zahl »

The name change was an accident when I copied some cleaned up code from Raze. I don't know why it was changed there, I think it was because initially I changed the key names to what EDuke used, but later forgot to revert these when I switched back to ZDoom's names.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

I thought it was intentional, i think it's actually better to keep the new name else you won't get LCrtl/LShift with merging disabled and with it enabled you could say that both keys act as left Control/Shift (setting the cvar to false by default). Never mind.
User avatar
SanyaWaffles
Posts: 891
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by SanyaWaffles »

So it is not supposed to do this.

I'm hoping it's fixed soon. Because it pretty much renders the build unusable unless I manually specify binds, but the whole purpose of DEFBINDS is to offer a preset for people to use.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3211
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [4fb6b7c] - Inconsistencies with DEFBINDS

Post by drfrag »

But why is it unusable? The name will change back to Ctrl i guess but about mouse2 for me gzdoom-x64-g4.4pre-134-g52f1c8a0d works the same (alt fire for your test and the one i chose which was zoom for doom2).
Post Reply

Return to “Closed Bugs [GZDoom]”