Fuat Ulugay
Fuat Ulugay

Reputation: 559

native nodejs mouse and keyboard event listener

I am looking for a package for listening mouse and keyboard events system wide. I am using electron and nodejs.

I tried:

I did lots of search but did not manage to find any others that will help.

Are there any mouse/keyboard listeners which supports mac/windows new versions; and which does not depend on other languages?

Upvotes: 4

Views: 1453

Answers (1)

Pecacheu
Pecacheu

Reputation: 388

So since I couldn't find a good alternative nodejs module to iohook that hasn't died off years ago and no longer works... I decided to make my own by updating a fork (which is itself a fork of the OG iohook, lol)

It also has a feature the original didn't... Key code to key name parsing! (Note: Probably only fully works in a US QWERTY layout, but MOST of the keys should be right in any layout)

You can find it here: https://github.com/Pecacheu/node-iohook

Or install it with npm install iohook2

Upvotes: 1

Related Questions