oblitum / Interception

The Interception API aims to build a portable programming interface that allows one to intercept and control a range of input devices.
http://oblita.com/interception
1.32k stars 271 forks source link

Works after boot, but can't use mouse and keybord after wakeing from sleep. #181

Open TheCodeingPadawan opened 3 months ago

TheCodeingPadawan commented 3 months ago

If my computer goes to sleep, upon wake, the mouse and Keyboard no longer respond. Unplugging and re-plugging in doesn't work even in different USB ports. Only a reboot Fixes the problem.

OS Name Microsoft Windows 11 Pro Version 10.0.22631 Build 22631 Processor AMD Ryzen 7 2700X Mobo PRIME X370-PRO

TheBestPessimist commented 3 months ago

That's normal and it is explained in other issues. On resume from sleep or hibernate sometimes windows disconnects a usb device and reconnects it under another number, always increasing. As interception supports only 10 devices in the free variant, this will happen.

It's the same as if you were to unplug and plug back in your usb keyboard multiple times.

TheCodeingPadawan commented 3 months ago

So... This is useless if you make frequent use of sleep? What if i tell windows to not allow the computer to power off the keyboard and mouse in there power settings, Would that prevent this?

TheBestPessimist commented 3 months ago

Try it and see, but i don't think it will help.

petriojk commented 1 month ago

As comments say, this is related to issue 25: https://github.com/oblitum/Interception/issues/25. But is there a way to disable the Interception driver from mouse, but keep it active on keyboards? My case is that my Bluetooth mouse will make reconnects and all pointer devices will be blocked after few days. The keyboards are still working and I need the driver only for two keyboards. So I would like to keep the Interception driver activated for the keyboard, but disable it for the mouse. Any ideas if this can be done?

What I already tried was changing the registry based on these instructions in Reddit r/Valorant

_

This happens because when installing interception, it modifies "UpperFilters" in the following registry keys: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e96b-e325-11ce-bfc1-08002be10318} HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e96f-e325-11ce-bfc1-08002be10318}

Since the driver then fails to load, this results in the keyboard/mouse not working anymore. This can also be fixed by just setting "UpperFilters" back to the correct value, "mouclass" in {4d36e96f-e325-11ce-bfc1-08002be10318} and "kbdclass" in {4d36e96b-e325-11ce-bfc1-08002be10318}. The interception uninstaller does the same thing.

_

After changing the registry keys only for the mouse, both mouse and keyboard stopped working, so this was not working. But I think something like this could be tried out where the mouse uses normal driver? Or maybe it is possible to modify the code so that it will activate the driver only for the keyboards?