Feature request: Possibility to change preset on button press, not release #3189
Description
Is your feature request related to a problem? Please describe.
I'm using WLED to control my bathroom light and to switch it on/off with a momentary switch. Right now, the light only toggles when I release the momentary switch (configured as "Pushbutton" in WLED), not when pressing it.
Describe the solution you'd like
I would like the LEDs to switch on/off when pressing the button down.
Describe alternatives you've considered
There is no good alternative except changing the source code (or accepting the current behavior) :)
I understand why the current implementation only triggers an action when releasing, and obviously this behavior should not break.
My idea is, when the same preset is configured for all actions (short, long, double), it makes no sense to wait for the release, and the action could trigger instantly. Another possibility could be an option to change the behavior.
Additional context
I already implemented it for me, but maybe it's useful for others as well.
See commit Sebbb@d5e940a
I didn't create a PR as I don't know if my idea how to solve it is good. My code probably isn't ;)