wilix-team / iohook

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

Error: XKB support is required to accurately determine keyboard characters! #298

Open dandv opened 3 years ago

dandv commented 3 years ago

Context

I'm getting the same error as in #293, but on a desktop Kubuntu install run on a VMWare virtual machine. After installing the library, I've tried to run example.js:

$ sudo apt-get install -y libxkbcommon-x11-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libxkbcommon-x11-0 is already the newest version (0.10.0-1).
libxkbcommon-x11-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 172 not upgraded.
dandv@ubuntu:~/iohook$ node example.js 
load_input_helper [1918]: Using XFree86 keyboard layout.
load_input_helper [1920]: XKB support is required to accurately determine keyboard characters!
Segmentation fault (core dumped)

Your Environment

metal450 commented 3 years ago

Same. I was running Node 10 & this worked, immediately upon updating to Node 14 it broke, & now displays the error shown above:

XKB support is required to accurately determine keyboard characters
Segmentation fault (core dumped)
metal450 commented 3 years ago

And just to clarify: this is running on my local system, not on heroku or a server, like the linked issue.

I've also spent the past ~3 hours trying to instal & build various versions, while trying to run various versions of Node through n. Everything I've tried seems to be broken one way or another: it tries to download a prebuild binary from an invalid url, running crashes with a message like above, etc. It seems like there are dozens of issues about this not working recently, would be great for some feedback. It was working fine until I updated my system to Node 14.

ash0x0 commented 3 years ago

Do you have more information on this? I can't replicate this is Node 14 on linux. Does this happen outside VMs?

ash0x0 commented 3 years ago

I've been able to repro this on Ubuntu 20.04 with Node 14.17.0. I can't find a workaround but the issue is within libuiohook and seems to be an issue for the fork in this repo not upstream, which is not compatible with this repo right now. Fixing this will be through changing the addon interface and gyp definition to be compatible with upstream libuiohook, which will also fix tons of issues. This will happen after the current build and install have been redone, probably in a couple of weeks.

ThanosJS commented 3 years ago

Hi, I would like to try it but there is just the bug with node 14 version. Can I know when I will be able to run it on Ubuntu 20?

veeramarni commented 3 years ago

@ash0x0 Any update on when it will be fixed in Node 14, I'm using Mac OS and it doesn't work.

ash0x0 commented 3 years ago

@ash0x0 Any update on when it will be fixed in Node 14, I'm using Mac OS and it doesn't work.

This should be fixed once I finish the refactor I'm working on now (as soon as I find time for it) or at least that's the theory I have for this bug at the moment.

immjs commented 2 years ago

Hello, I just wanted to know if you found the issue. I really hope this can get fixed soon.

pixartist commented 1 year ago

this is still happening on ubuntu 22