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
Currently, when a key is bound multiple times, the last binding operation overrides the previous ones.
Expected behavior
When a key or mouse event is bound multiple times, InputBot dispatches the event to all callback functions, in the order in which they were registered.
Note: this would be a breaking change.
After thinking about it, I found the current API, with KeydbKey:unbind(&self), would make a rather coarse API, requiring to unregister all callbacks at once.
Alternative
Provide a new interface which handles dispatch.
The text was updated successfully, but these errors were encountered:
@mathieucaroff I agree that we would probably want to have a different unbind method. Maybe something like KeydbKey:unbind(&self, fn) where fn is the function bound to the event originally.
How would the alternative with an interface for handling dispatch look like?
Current behavior
Currently, when a key is bound multiple times, the last binding operation overrides the previous ones.
Expected behavior
When a key or mouse event is bound multiple times, InputBot dispatches the event to all callback functions, in the order in which they were registered.
Note: this would be a breaking change.
After thinking about it, I found the current API, with
KeydbKey:unbind(&self)
, would make a rather coarse API, requiring to unregister all callbacks at once.Alternative
Provide a new interface which handles dispatch.
The text was updated successfully, but these errors were encountered: