It's just easier if you switch to multi-device Logitech keyboard and mouse. Some good and not expensive ones are the Logitech K780 for the keyboard and the M720 for the mouse. If you want to spend a bit more, then there's also the MX keys for the keyboard and the MX Master 3S for the mouse. You just press a button and voila' you have switched to another device. It couldn't be any easier really.