Check, if the hotkey is still pressed?
Posted: Sat May 06, 2023 8:39 pm
I wonder, if it's possible to check, if a hotkey is still pressed after the initial event.
I'm currently try to implement some kind of support of dragging the mouse over entities and do something, while the hotkey is still pressed.
My current approach is to save, that the hotkey event has happened and keep doing things, on the "on_selected_entity_changed" event while not more than 30 ticks are passed. This kinda works, but I can also stop pressing the hotkey and only move the mouse from entity to entity. This feel a bit janky
I'm currently try to implement some kind of support of dragging the mouse over entities and do something, while the hotkey is still pressed.
My current approach is to save, that the hotkey event has happened and keep doing things, on the "on_selected_entity_changed" event while not more than 30 ticks are passed. This kinda works, but I can also stop pressing the hotkey and only move the mouse from entity to entity. This feel a bit janky