UNPKG

rkeys

Version:

A platform for creating tablet/HTML5 virtual-keyboard apps to send keystrokes to remote X11

22 lines (21 loc) 571 B
// Generated by LiveScript 1.3.0 (function(){ var _, Sim, split$ = ''.split; _ = require('lodash'); Sim = require('../../x11/buttonsim'); module.exports = function(arg$){ var command, direction, id, cmdarr; command = arg$.command, direction = arg$.direction, id = arg$.id; if (command == null) { return false; } if (_.isArray(command)) { return false; } if ((cmdarr = split$.call(command, ' '))[0] !== 'button') { return false; } [Sim.down, Sim.up][direction](cmdarr[1]); return true; }; }).call(this);