Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.
This repository was archived by the owner on Jan 4, 2026. It is now read-only.

I can't click or use the keyboard #6

Description

@ltinerary

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions