mirror of
https://github.com/danbulant/node-x11
synced 2026-07-04 18:50:36 +00:00
keyboard event
This commit is contained in:
parent
14b9c87d55
commit
3732cc4e20
1 changed files with 6 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
|
||||||
event.type = type;
|
event.type = type;
|
||||||
event.seq = seq;
|
event.seq = seq;
|
||||||
|
|
||||||
if (type == 2 || type == 4 || type == 5 || type == 6) { // motion event
|
if (type == 2 || type == 3 || type == 4 || type == 5 || type == 6) { // motion event
|
||||||
var values = raw.unpack('LLLssssSC');
|
var values = raw.unpack('LLLssssSC');
|
||||||
//event.raw = values;
|
//event.raw = values;
|
||||||
// TODO: use unpackTo???
|
// TODO: use unpackTo???
|
||||||
|
|
@ -352,10 +352,15 @@ module.exports.createClient = function(initCb, display)
|
||||||
} else if(host == '127.0.0.1')
|
} else if(host == '127.0.0.1')
|
||||||
socketPath = '/tmp/.X11-unix/X' + displayNum;
|
socketPath = '/tmp/.X11-unix/X' + displayNum;
|
||||||
}
|
}
|
||||||
|
socketPath = display;
|
||||||
if(socketPath)
|
if(socketPath)
|
||||||
|
{
|
||||||
stream = net.createConnection(socketPath);
|
stream = net.createConnection(socketPath);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
stream = net.createConnection(6000 + parseInt(displayNum), host);
|
stream = net.createConnection(6000 + parseInt(displayNum), host);
|
||||||
|
}
|
||||||
var client = new XClient(stream, displayNum, screenNum);
|
var client = new XClient(stream, displayNum, screenNum);
|
||||||
if (initCb)
|
if (initCb)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue