gaucho-labs / leptos-hotkeys

a declarative way of using keyboard shortcuts + callbacks in leptos applications
https://leptos-hotkeys.vercel.app
MIT License
43 stars 8 forks source link

Multiple events on long press. #107

Open zakstucke opened 3 months ago

zakstucke commented 3 months ago

I don't think this was the case in prior versions, or at least I didn't notice it.

When long pressing keys, matching bindings fire their callbacks 10s of times a second. I've had to implement throttling on the code being run by the hotkeys internally to work around.

Either as default, or an option, long presses should not trigger the callback again until release and re-press.