Open michal7918 opened 3 years ago
Hi Michal. Thanks for reporting the issue.
The code is very simple, so it's obvious what's wrong. I just need to figure out how to prevent that. I don't use the script anymore as I have a new keyboard, but I will try to find time to work on this in the coming days.
Thank you. I'm not familiar with python but I assume that basic problem is that scripts assume that device is always connected. I hope you can figure out solition to this issue. Thank you so much for looking at that. Cheers.
I just tried running this as a system service.
When the keyboard is disconnected the service is stopped, and when the keyboard is connected again the service is started automatically.
So, working like a charm as a service.
Thank you for useful script! It fixed chattering problem with my Rapoo E9260 keyboard and works better than other solutions suggested elsewhere.
Unfortunately since I run it on notebook with docking station, I frequently undock my notebook and then problem starts. In most cases (not every time), soon after the dock and keyboard is disconnected, the python3 process starts consuming full CPU thread capacity, leading to ventilator running in full speed until the process is terminated. It happens both in case running script from service or command line.
I hope you can fix this issue.