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
Device objects cache: Cache devices objects by device id, so when a device object is requested for the same id, the same reference for an existing one would be returned. This could remove some stress on the garbage collector, and should be possible to be done using WeakMap and maybe Symbol too.
Events pattern: The interception class can be an events emitter, emitting events like:
device: After a wait() call.
mouse: When the device is a mouse.
keyboard: When the device is a keyboard.
stroke: When the stroke is received.
mouse_stroke: When a mouse stroke is received.
key_stroke: When a keyboard stroke is received.
mouse_down: When a mouse button is down.
mouse_up: When a mouse button is up.
mouse_scroll: When a mouse wheel is scrolled.
mouse_move: When the mouse moves.
key_down: When a key is pressed down.
key_up: When a key is released.
key_e0: When a special key is pressed down.
key_e1: When a special key is released.
Events: Events objects like the DOM ones can be used, with the preventDefault functionality for blocking the whole event and such.
Construction Options: With the events system, it would be nice to have the events filters automatically setup at initialization. It would also be good to add an option for automatically translating e0 and e1 key strokes to up and down.
The text was updated successfully, but these errors were encountered:
WeakMap
and maybeSymbol
too.wait()
call.preventDefault
functionality for blocking the whole event and such.e0
ande1
key strokes toup
anddown
.The text was updated successfully, but these errors were encountered: