Module to get mouse events in whole screen


#1

Hello,
I am currently looking for a module that can give mouse button stats in screen.
Do someone know one ?

Thanks in advance.


#2

Hello,

If you want stats to mouse click right, you can used “context-menu” event

With Jquery library by exemple
(document).click(function(event) { isTrueClick = event.originalEvent.isTrusted; ... }) (document).on( “scroll”,function(event) {

});


#3

Thanks Shmuel83 for your help, when I am saying “screen” I am not saying the browser window I am saying the WHOLE screen, the OS screen.

Will $(document) refer to the OS screen or the browser window ?


#4

Sorry,

You must used/created a module to do that.
I don’t find an npm module, but maybe, you can see robotjs : For mouse control, but not for event click


#5

There is a copy function in the source code to get mouse buttons but not available in the final module


#6

I find maybe the module that you have need : https://www.npmjs.com/package/node-mouse


#7

Thanks, but node-mouse only works with linux mouses


#8

Robotjs controls the mouse and can only get mouse position