On the latest additions that allow the use of global keybinds a few things have to be noted:
-
Specify your Nodejs ABI number in
package.json
underiohook/targets
- Run
node -v
and note down your nodejs version - Note down the
NODE_MODULE_VERSION
from here by referring your previouly noted down nodejs version - In
package.json
addnode-%NODE_MODULE_VERSION%
toiohook/targets
- Run
-
Specify your electron ABI in
package.json
underiohook/targets
- Run an electron app without importing
iohooks
- Open the dev console and type
process.versions.modules
- In
package.json
addelectron-%process.versions.modules%
toiohook/targets
- Run an electron app without importing
-
Run
npm i iohook
-
Finally run
npm run dev
and you global keybinds (including PTT) should start working
NOTE: I have no idea why iohook requires this but it does. And I only found iohook to be a reliable module to detect the
keyup
andkeydown
events (when app in background) for use with PTT.