iohook icon indicating copy to clipboard operation
iohook copied to clipboard

"mousedown" event is fired when the mouse button is released

Open Jleguim opened this issue 5 years ago • 4 comments

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)

  1. Make a script with the above code.
  2. Press the left mouse button for 10 seconds.
  3. 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:

Jleguim avatar Feb 17 '20 08:02 Jleguim

I don't know if you guys need any more info, if so, let me know.

Jleguim avatar Feb 17 '20 08:02 Jleguim

Bump

Jleguim avatar Feb 22 '20 20:02 Jleguim

@Djiit ping!

Jleguim avatar Mar 10 '20 04:03 Jleguim

I'm having the same issue :/

vervoortkobe avatar Apr 03 '21 16:04 vervoortkobe