robotjs-combos
Easy node API to allow for the easy use of key combinations in robot.js
I was trying to do a simple chain of keyboard commands, this one does a quick loop around my workspaces (2X2) in linux using the standard ctrl+alt+arrow
:
Installation
$ npm install robotjs-combos
Quick Usage
The module takes an array of key combonations executed in order:
robotjs_combo = ;var commands = "alt""control""right""alt""control""down""alt""control""left""alt""control""up";
or just a single keypress combination:
//takes a single key combinationvar command = "alt""control""left";
API Spec:
robotjs_combo(command_string,callback,optional_timeout);
The optional timeout is the length of time between presses. I may add other ways to tune this in the future
Explanation of why:
I was working on a project and wanted a simple API to do complex keypress sequences...here is the above multiple keypress thing i came up with:
robot;robot;;
...ugly.
So instead I wrote a quick module that can be used instead