boppreh / keyboard

Hook and simulate global keyboard events on Windows and Linux.
MIT License
3.8k stars 433 forks source link

Not working in WSL #500

Open NoozAbooz opened 2 years ago

NoozAbooz commented 2 years ago

I'm currently using WSL2 debian to test a python script of mine. When I ran my script, it told me the library needed to be run as root. I ran my script as root, but then it crashed with this error:

/usr/local/lib/python3.9/dist-packages/keyboard/_nixkeyboard.py:110: UserWarning: Failed to create a device file using uinput module. Sending of events may be limited or unavailable depending on plugged-in devices. device = aggregate_devices('kbd')