wilix-team / iohook

Node.js global keyboard and mouse listener.
https://wilix-team.github.io/iohook
MIT License
1.2k stars 291 forks source link

iohook not working windows #249

Closed tezlm closed 3 years ago

tezlm commented 4 years ago

Running const ioHook = require("iohook"); doesn't work, even if that's the only thing in the file

Using

Expected Behavior

Loads iohook

Current Behavior

internal/modules/cjs/loader.js:1187
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/mnt/c/Users/bagle/OneDrive/Desktop/coding junk/ocr/node_modules/.pnpm/iohook@0.6.6/node_modules/iohook/index.js:10:21)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)

Steps to Reproduce (for bugs)

  1. pnpm init
  2. pnpm i iohook
  3. Put in index.js: const ioHook = require("iohook");
  4. node index.js
  5. Watch your hopes and dreams get destroyed

Context

Your Environment

See above

matthew-plusprogramming commented 3 years ago

Same issue here (although not sure if this can be done since WSL is a virtual machine)

abhijit-hota commented 3 years ago

Same issue here (although not sure if this can be done since WSL is a virtual machine)

Do you mean it can't/won't be fixed for WSL?!

abhijit-hota commented 3 years ago

Update: Take a look at this issue I mentioned. Specifically the discussion since this comment:

ash0x0 commented 3 years ago

Closing as resolved.