Timed Hold Bindings Suggestion.

Moderator: GZDoom Developers

Post Reply
User avatar
I'mSorry
Posts: 49
Joined: Fri Oct 11, 2019 11:17 pm
Operating System Version (Optional): Pop!_OS 22.04 LTS
Graphics Processor: Intel (Legacy GZDoom)
Location: Mexico

Timed Hold Bindings Suggestion.

Post by I'mSorry »

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.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Timed Hold Bindings Suggestion.

Post by Gez »

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 [wiki]CCMDs[/wiki] 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.
User avatar
I'mSorry
Posts: 49
Joined: Fri Oct 11, 2019 11:17 pm
Operating System Version (Optional): Pop!_OS 22.04 LTS
Graphics Processor: Intel (Legacy GZDoom)
Location: Mexico

Re: Timed Hold Bindings Suggestion.

Post by I'mSorry »

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 [wiki]CCMDs[/wiki] 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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Timed Hold Bindings Suggestion.

Post by Graf Zahl »

The key binding system does not work like that. There is no state associated to what you want to do here.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”