lint lib/gpmclient.js
This commit is contained in:
parent
4304ce8bb8
commit
a8fd21dc3e
|
@ -10,16 +10,11 @@ var EventEmitter = require('events').EventEmitter;
|
|||
|
||||
var GPM_USE_MAGIC = false;
|
||||
|
||||
var GPM_MOVE = 1
|
||||
, GPM_DRAG = 2
|
||||
, GPM_DOWN = 4
|
||||
, GPM_UP = 8;
|
||||
var GPM_MOVE = 1, GPM_DRAG = 2, GPM_DOWN = 4, GPM_UP = 8;
|
||||
|
||||
var GPM_DOUBLE = 32
|
||||
, GPM_MFLAG = 128;
|
||||
var GPM_DOUBLE = 32, GPM_MFLAG = 128;
|
||||
|
||||
var GPM_REQ_NOPASTE = 3
|
||||
, GPM_HARD = 256;
|
||||
var GPM_REQ_NOPASTE = 3, GPM_HARD = 256;
|
||||
|
||||
var GPM_MAGIC = 0x47706D4C;
|
||||
var GPM_SOCKET = '/dev/gpmctl';
|
||||
|
@ -104,7 +99,6 @@ function GpmClient(options) {
|
|||
try {
|
||||
path = fs.readlinkSync('/proc/' + pid + '/fd/0');
|
||||
} catch (e) {
|
||||
;
|
||||
}
|
||||
var tty = /tty[0-9]+$/.exec(path);
|
||||
if (tty === null) {
|
||||
|
@ -207,15 +201,15 @@ GpmClient.prototype.ButtonName = function(btn) {
|
|||
};
|
||||
|
||||
GpmClient.prototype.hasShiftKey = function(mod) {
|
||||
return (mod & 1) ? true : false;
|
||||
return (mod & 1);
|
||||
};
|
||||
|
||||
GpmClient.prototype.hasCtrlKey = function(mod) {
|
||||
return (mod & 4) ? true : false;
|
||||
return (mod & 4);
|
||||
};
|
||||
|
||||
GpmClient.prototype.hasMetaKey = function(mod) {
|
||||
return (mod & 8) ? true : false;
|
||||
return (mod & 8);
|
||||
};
|
||||
|
||||
module.exports = GpmClient;
|
||||
|
|
Loading…
Reference in New Issue