Closed Tazdraperm closed 10 months ago
I can confirm a similar issue. When running my program inside a vm it was not able to auto_capture the native virtual keyboard (Microsoft Hyper-V virtual keyboard). I had to manually force interception.set_capture(keyboard=0) and it works now. However, i did not have to modify the library per the above suggestion.
Set_devices does not work with device 0. It happens because
keyboard or interception.keyboard
evalueates tointerception.keyboard
ifkeyboard
is0
, since0
is considered "falsy". So usingset_devices(keyboard=0)
has in fact no effect.Proposed solution:
interception.keyboard = keyboard if keyboard is not None else interception.keyboard
(same for mouse)