electron-iohook
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

electron-iohook

iohook for Electron, with prebuilds.

Limitations

  • It only works for the latest Electron, currently version 15.
  • It only works for macOS and windows, no Linux support.
  • It only works for 64-bit OS, no 32-bit support.
  • It doesn't work with Node.js. It is for Electron only.

The limitations above could be worked around, of course. Please fork this project and do it yourself.

Usage

import ioHook, {IOHookEvent} from 'electron-iohook';

ioHook.on('mousedown', (event: IOHookEvent) => {
  console.log(event);
});

ioHook.start();

How to build the latest prebuilds

Git clone official iohook.

npm install

macOS

node build.js --runtime electron --version 15.0.0 --abi 98 --upload=false

Built files are in ./build/Release folder, they are

  • iohook.node
  • uiohook.dylib

windows

Install VS Studio 2019 with C++ desktop development kit.

node build.js --runtime electron --version 15.0.0 --abi 98 --upload=false --msvs_version=2019

Built files are in ./build/Release folder, they are

  • iohook.node
  • uiohook.dll

How do I know Electron's abi?

./node_modules/electron/cli.js -a

Readme

Keywords

none

Package Sidebar

Install

npm i electron-iohook

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

453 kB

Total Files

9

Last publish

Collaborators

  • tylerlong