Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
parent
5760a2d98d
commit
361e88d079
15
js/x11/examples/smoketest/xtesttest.js
Normal file
15
js/x11/examples/smoketest/xtesttest.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
var x11 = require('../../lib');
|
||||||
|
|
||||||
|
var xclient = x11.createClient(function(err, display) {
|
||||||
|
var X = display.client;
|
||||||
|
var root = display.screen[0].root;
|
||||||
|
display.client.require('xtest', function(err, Test) {
|
||||||
|
console.log(Test);
|
||||||
|
setInterval(function() {
|
||||||
|
Test.FakeInput(Test.KeyPress, 65, 0, root, 0, 0); // space
|
||||||
|
Test.FakeInput(Test.KeyRelease, 65, 0, root, 0, 0); // space
|
||||||
|
console.log('click');
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
display.client.on('error', function(err) { console.log(err); });
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user