Skip to content

brads-tools/node-kbstroke

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 51.4%
  • C++ 45.7%
  • Python 2.9%