octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.3k stars 949 forks source link

Question : Is it possible to "preventDefault()" actions? #613

Open moeiscool opened 3 years ago

moeiscool commented 3 years ago

Hello, I am looking to make an alternative to Sharemouse with Robotjs. In essence I would like to be able to "preventDefault" or "return null" a key press when the mouse has "moved over to another computer".

short question : is it possible to make a key press or mouse click do nothing?

Breif description of Sharemouse for anyone who doesn't know what it is : It allows you to use one set of keyboard and mouse across multiple operating systems.

Sorry if I didn't follow post format, it seemed the template was for a bug. This is not a bug, just a question on how to use. Thanks!

Programmnix commented 3 years ago

Hello @moeiscool ,

I've not seen such a functionality in the source code. :-( I Think you have to implement it by yourself with system calls.