You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem?
Current Input code allows you to switch an input with a combination of input_binding_scan_start and input_binding_set_safe. But there isn't currently an easy way to add/subtract from the list, instead of merely replacing an input on the list.
Describe the solution you'd like
It would be cool if that was already a predefined function; something like input_binding_add_safe (and input_binding_subtract_safe). It would go a long way towards accessibility! The complete process would look something like:
if keyboard_check_pressed(ord("Q")) { input_binding_scan_start(function(_binding) { input_binding_add_safe("up", _binding); }); }
...which would scan for the next pressed key, then add to the list of the current "up" inputs by replacing the first one that returns as "undefined" (aka empty).
Describe alternatives you've considered
By adding for loops and utilizing alternatives left undefined, you can force it to add/subtract from the list, instead of switching. For adding inputs, this would be a for loop that checks for the first undefined alternative, then replaces it with the input_binding_scan_start key. But this is difficult and could be automated.
Additional context
I am a novice-at-best programmer so the solution is my best guess rather than an expert opinion. But I'm sure this is possible!
The text was updated successfully, but these errors were encountered:
This is possible using the existing API and I don't believe Input should be insulating you from learning to use loops. Iterating through alternates and using binding_set_safe, binding_get_verbs, and binding_remove are the tools you need to achieve the behaviour you've described.
Is your feature request related to a problem?
Current Input code allows you to switch an input with a combination of input_binding_scan_start and input_binding_set_safe. But there isn't currently an easy way to add/subtract from the list, instead of merely replacing an input on the list.
Describe the solution you'd like
It would be cool if that was already a predefined function; something like input_binding_add_safe (and input_binding_subtract_safe). It would go a long way towards accessibility! The complete process would look something like:
if keyboard_check_pressed(ord("Q")) { input_binding_scan_start(function(_binding) { input_binding_add_safe("up", _binding); }); }
...which would scan for the next pressed key, then add to the list of the current "up" inputs by replacing the first one that returns as "undefined" (aka empty).
Describe alternatives you've considered
By adding for loops and utilizing alternatives left undefined, you can force it to add/subtract from the list, instead of switching. For adding inputs, this would be a for loop that checks for the first undefined alternative, then replaces it with the input_binding_scan_start key. But this is difficult and could be automated.
Additional context
I am a novice-at-best programmer so the solution is my best guess rather than an expert opinion. But I'm sure this is possible!
The text was updated successfully, but these errors were encountered: