[No] Timed Hold Bindings Suggestion.

Moderator: GZDoom Developers

Timed Hold Bindings Suggestion.

Postby I'mSorry » Tue Mar 22, 2022 11:48 am

I don't know if something like this is already in the GZDoom or not but having the ability to bind an action to a key so that when a certain amount of time passes with the key held down, the action is executed. Lets say E is bound to open/use but I also want to bind like some menu from a mod (and the double bind is already bound to something else).

Something like "bind E "ModMenu" 3" where the 3 is the time that has passed in seconds to open the menu would be really neat. Something like this would be really useful for the few of us that play with a controller from time to time too.

I was in the hospital for a bit and I thought that it would have been really useful to have a feature like that along with the normal binds and double binds since all the buttons on my controller were taken up by actions already. Timed binds would be great and would open up a more flexible way to bind things.

There aren't many of us that need to use a controller all that often I don't think but still having something like that would be amazing. And if it's already a thing, I can't find a way to do it :/

Hope that it's even possible. Even via like a mod or something.
User avatar
I'mSorry
Piss blood & play some DOOM!
 
Joined: 12 Oct 2019
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: Not Listed

Re: Timed Hold Bindings Suggestion.

Postby Gez » Tue Mar 22, 2022 12:07 pm

There's no hold bindings, but there is a double binding, as in if you hit the same button twice in a short time, it can perform a different action. One note about bindings is that some actions have "+" and "-" versions, so they execute the "+" version when the key is pressed and the "-" action when the key is released. See CCMDs for an overview of the command system's behind-the-scene. (If you know Quake, it's basically the same deal.)

With some advanced scripting, you could probably use this to detect when a key is held down a certain while, just by timing how long there was between the + event and the - event.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Timed Hold Bindings Suggestion.

Postby I'mSorry » Tue Mar 22, 2022 12:26 pm

Gez wrote:There's no hold bindings, but there is a double binding, as in if you hit the same button twice in a short time, it can perform a different action. One note about bindings is that some actions have "+" and "-" versions, so they execute the "+" version when the key is pressed and the "-" action when the key is released. See CCMDs for an overview of the command system's behind-the-scene. (If you know Quake, it's basically the same deal.)

With some advanced scripting, you could probably use this to detect when a key is held down a certain while, just by timing how long there was between the + event and the - event.


Yeah I know about how the key binding system works, thanks though!. It's so great already but I was just wondering if it cold be fully implemented and added into gzdoom.

Maybe someone someday might make a mod like that. that would be so useful.
User avatar
I'mSorry
Piss blood & play some DOOM!
 
Joined: 12 Oct 2019
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: Not Listed

Re: Timed Hold Bindings Suggestion.

Postby Graf Zahl » Tue Mar 22, 2022 1:51 pm

The key binding system does not work like that. There is no state associated to what you want to do here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests