This repository was archived by the owner on Sep 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Possible API Enhancements #1
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
- 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
WeakMapand maybeSymboltoo. - 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.
- device: After a
- Events: Events objects like the DOM ones can be used, with the
preventDefaultfunctionality 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
e0ande1key strokes toupanddown.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request