Closed damodaranr closed 3 years ago
Thanks for getting back quickly with that useful information. Was able to achieve mouse click at a desired location using the following snippet: var X = display.client; var root = display.screen[0].root; X.require('xtest', function(err, Test) { X.WarpPointer(0, root,0, 0, 0, 0, 1831, 38); Test.FakeInput(Test.ButtonPress, 1, 0, root, 0, 0); // space 65 Test.FakeInput(Test.ButtonRelease, 1, 0, root, 0,0); // space console.log('click'); });
Can I please get an example of how to send button click events using X.SendEvent? It is quite confusing how to send the data through a node buffer through the node-x11 api for this method.
x11.eventMask.ButtonPress
Also, I tried to use the XTestFakeButtonEvent but that doesn't seem to be supported by this library.
https://linux.die.net/man/3/xtestfakebuttonevent