[4fb6b7c] - Inconsistencies with DEFBINDS
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.
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.
- 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
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.
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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
).
May be it's unrelated to the second issue but there's an unfinished feature to support multiple binding presets now in GZDoom.
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
May be it's unrelated to the second issue but there's an unfinished feature to support multiple binding presets now in GZDoom.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
Actually there are no events for them in bool GUIWndProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result).
And then in d_gui.h:
And then there are more occurrences for both VK_SHIFT and GKM_SHIFT and the others.
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;
Code: Select all
enum GUIKeyModifiers
{
GKM_SHIFT = 1,
GKM_CTRL = 2,
GKM_ALT = 4,
GKM_META = 8,
GKM_LBUTTON = 16
};- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
That's GUI input, not game input.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
Yes but i thought you needed to set the keys in the GUI for them to work ingame.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
No, it's totally different interfaces.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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
- 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
I'm not sure what the confusion is to be frank.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).
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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?
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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.
- 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
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.
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3211
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [4fb6b7c] - Inconsistencies with DEFBINDS
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).