LiveSplit / livesplit-core

livesplit-core is a library that provides a lot of functionality for creating a speedrun timer.
https://livesplit.org/
Apache License 2.0
210 stars 57 forks source link

Add a way to detect key release in livesplit-hotkey #633

Open Roger opened 1 year ago

Roger commented 1 year ago

Currently is only possible to detect keys pressed, but not the release event.

Had a look at the linux implementations and should be simple (didn't check mac/win/wasm), but I don't think that there's a way to make this backwards compatible other than creating another register/unregister methods.

Would you consider something like this? what would be a good api? new methods? an argument in the callback with some enum with KeyDown/KeyUp? another optional callback for the release?

CryZe commented 8 months ago

Mmh, I'm not sure this makes sense for our use case, cause it's not a generic keyboard API and instead specifically a hotkey listener where you want to know when the hotkey is pressed, especially in our case where the timing is really important.