node-remote icon indicating copy to clipboard operation
node-remote copied to clipboard

I can't click or use the keyboard

Open ltinerary opened this issue 4 years ago • 0 comments

I start a service by node remote-server.js. And I can visit it by 8000 port. I can control the mouse,but the keyborad can‘t work. it had an error: the root is not defined. this code is the error from.

XManager.prototype.keyUp = function (keyCode){
	X.require('xtest', function(test) {
			test.FakeInput(test.KeyRelease, self.keyMapper.mapKey(keyCode), 0, root, 0, 0);
	});
}

XManager.prototype.keyDown = function (keyCode){
	X.require('xtest', function(test) {
			test.FakeInput(test.KeyPress, self.keyMapper.mapKey(keyCode), 0, root, 0,0);
	});
}

XManager.prototype.click = function (clickCode){
	X.require('xtest', function(test){
		test.FakeInput(test.ButtonPress, clickCode, 0, root, 0,0);
		test.FakeInput(test.ButtonRelease, clickCode, 0, root, 0,0);
	});
}

By the way,in the browser,I just saw the text:Move your mouse around to control the other computer. Is this as expected?

ltinerary avatar Sep 28 '21 06:09 ltinerary