windows 10 – logitech mouse,keyboard detected only at bootup?

I have a Logitech wireless mouse, keyboard pair with USB receiver
(not the short “unified” one, but a bit longer one).
If I plug in the USB and reboot Windows, the USB receiver is detected
as “Logitech HID-compliant Cordless Mouse” and keybord respectively
and both the peripherals work fine.

If I plug out the USB receiver (when I am leaving my desk) and then
come back and plug it in, it doesn’t work! I will have to plug-in and
reboot windows again !!

Why does Windows seem to loose the information on USB removal!?
Do I have to make some entry in the registry ?

Program mouse/keyboard events in virtual box

I’m running an Android virtual machine, and I want to send a predefined series of mouse clicks (and possibly also keyboard presses) to the machine without having to actually sit there and do it myself. Is there a way to do this?