mirror of
https://github.com/danbulant/node-x11
synced 2026-05-21 05:19:14 +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.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');
|
||||
//event.raw = values;
|
||||
// TODO: use unpackTo???
|
||||
|
|
@ -352,10 +352,15 @@ module.exports.createClient = function(initCb, display)
|
|||
} else if(host == '127.0.0.1')
|
||||
socketPath = '/tmp/.X11-unix/X' + displayNum;
|
||||
}
|
||||
socketPath = display;
|
||||
if(socketPath)
|
||||
{
|
||||
stream = net.createConnection(socketPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
stream = net.createConnection(6000 + parseInt(displayNum), host);
|
||||
}
|
||||
var client = new XClient(stream, displayNum, screenNum);
|
||||
if (initCb)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue