What I should have been doing (and what worked):
Thanks to the awesome information shared above and a bit of trial and error, I have two commands that switch my mouse and keyboard from the receiver in my laptop to the receiver in my desktop, and vice versa. Hey folks, been trying to get this working as well. Print("Manufacturer: %s" % h.manufacturer) # Just to ensure that it's using proper device # let's just try to execute it 9 times and exit on first success
# As sometimes I've got 'no device found' errors # hidapi_device.write(switch_mouse_from_2_to_1) # hidapi_device.write(switch_keyboard_from_2_to_1) Hidapi_device.write(switch_mouse_from_1_to_2) Hidapi_device.write(switch_keyboard_from_1_to_2)