No description, website, or topics provided.
JavaScript C++ Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
binding.cc
binding.gyp
index.js
package.json
test.js

README.md

node-kbstroke

c++ addon for nodejs

This detects keyboard strokes and mouse movement

(Windows Only, sorry linux, untested on mac)

var kbstroke = require("kbstroke");

kbstroke.on("keydown",function(key,numLock,capsLock,scrollLock){
    console.log("keydown",arguments);
});
kbstroke.on("keyup",function(key,numLock,capsLock,scrollLock){
    console.log("keyup",arguments);
    if(key == 27){//esc
      kbstroke.disable();  
    }
});
kbstroke.on("mousemove",function(pos){
    console.log(pos)
});
kbstroke.enable();

works with node webkit: https://github.com/rogerwang/node-webkit/wiki/Build-native-modules-with-nw-gyp

Copyright 2013 Bradley Matusiak