Detect system wide key-press? (node.js?)
<p>Is it possible to detect a key-press even if my node application is not in focus?</p>

<p>Back in the days there was this tool for <a href="http://www.dota-utilities.com/2009/10/warkey-warcraft-inventory-hotkeys.html" rel="noreferrer">warcraft</a> which would quickly move your mouse to a certain position and trigger a click when a keyboard button was pressed. That tool might still work on windows, but I was planning to build something similar for Mac (or with node.js even system wide) and not warcraft specific.</p>

<p>I googled a lot and found several tools to move the mouse and send keys as <a href="https://github.com/Loknar/node-macmouse" rel="noreferrer">nodemacmouse</a> or <a href="https://github.com/octalmage/robotjs" rel="noreferrer">robojs</a>, but I could not find anything to detect system wide keyboard input (which is crucial since the movements should only happen on key-press). This seems to be do-able <a href="https://github.com/octalmage/robotjs" rel="noreferrer">in cocoa</a> but a node solution would be flawless. Is it possible? How? Thanks.</p>