iohook
iohook copied to clipboard
"mousedown" event is fired when the mouse button is released
There was an issue made about this already https://github.com/wilix-team/iohook/issues/175, but the OP never gave more information. This basically means that the event "mousedown" and "mouseup" get fired at the same time.
const iohook = require("iohook");
function eventHandler(event) {
console.log(`Hello from ${event.type}`);
}
iohook.on("mousedown", eventHandler);
iohook.on("mouseup", eventHandler);
iohook.start();
Expected Behavior
The above code should log Hello from mousedown X amount of times until you release the button and log Hello from mouseup.
Current Behavior
Logs Hello from mousedown and Hello from mouseup after releasing the button.
Possible Solution
Unknown
Steps to Reproduce (for bugs)
- Make a script with the above code.
- Press the left mouse button for 10 seconds.
- Release the mouse button.
Your Environment
- Version used: 0.6.5
- Environment name and version: node.js v12.13.1
- Operating System and version: Windows 10 v1909
- Link to your project:
I don't know if you guys need any more info, if so, let me know.
Bump
@Djiit ping!
I'm having the same issue :/