Node.js adapter for Zephyros.
Include zephiros
in your script and you're ready to go!
var Zephyros = require('zephyros');
var z = new Zephyros({
port: 1235,
host: 'localhost'
});
z.bind('t', ['Cmd', 'Shift']).thenClipboardContents().then(function(clipboard){
console.log("clipboard: ", clipboard);
});
Please note that this is a partial implementation of all the APIs available.
- bind( key, Modifiers )
- thenClipboardContents( callback ), the clipboard is passed as an argument to the callback
- thenFocusedWindow( callback ), the window object with the id of the window is passed as an argument to the callback
- thenGetWindowFrame( callback ), the window object with the id and the frame of the window are passed as an argument to the callback
- thenSetWindowFrame( callback ), expect the callback to return a window object with id and frame properties.
Tests are written in Mocha. Simply run the test with:
~$ mocha