lint lib/gpmclient.js

This commit is contained in:
Iuri Matias 2018-12-21 21:30:33 -05:00
parent 4304ce8bb8
commit a8fd21dc3e
1 changed files with 6 additions and 12 deletions

View File

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