Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 2.76 KB

README.md

File metadata and controls

63 lines (41 loc) · 2.76 KB

iohook

Build status Build Status Gitter chat NPM version

About

Node.js global native keyboard and mouse listener.

This module can handle keyboard and mouse events via native hooks inside and outside your JavaScript/TypeScript application.

Found a bug? Have an idea? Feel free to post an issue or submit a PR.

Check out the documentation.

Installation

iohook provides prebuilt version for a bunch of OSes and runtime versions.

from git

npm i git+https://github.com:wurikiji/iohook.git 

Windows

  • for Node.js usage just make sure that you have installed following components and it will be built by install script
  • for Electron go to installation dir (node_modules/iohook) and recompile it according to your Electron version. e.g. cmake-js rebuild -r electron -v 2.0.0

Added feature

iohook.enableKeyboardPropagation()

You can enable keyboard event propagation. Keyboard events are propagated by default.

iohook.disableKeyboardPropagation()

You can disable keyboard event propagtion. Keyboard events are captured and emitted but not propagated to the apps.

iohook.enableMovePropagation()

iohook.disableMovePropagation()

You can enable or disable mouse movement propagtions.

FAQ

Q. Does this module require Java ?

A. No, this module doesn't require Java (like jnativehook) or any other runtimes.

Contributors

Thanks to kwhat for the libuiohook project and ayoubserti for the first iohook prototype.

  • vespakoen (prebuild system implementation)
  • matthewshirley (Windows prebuild fix)
  • djiit (project & community help)
  • ezain (add feature enable/disable mouse click propagation)
  • wurikiji (add features. refer to commit log and readme)
  • All the other contributors. Feel free to extend this list !