That last sentence explained it well to me that your USB receiver (I call this thing an USB Hub) is just buggy. External Hard Drives take quite a bit of power and again, you proved to me this does not work.
If you want to use a front or top access point for this, try adding a second "USB receiver" just for the HDD.
I can't guess why the keyboard is not plugged into the back of the desktop. That's unusual to plug them into a hub.
I use a Logitech K350 Keyboard and an M570 Mouse that run off the same Unifying USB adapter(plugged into 1 of 2 top of the tower USB 3.0 ports). I have no problems whatsoever with the mouse and keyboard UNTIL I plug in ANY other USB device in the secondary USB 3.0 port next to it. Once I plug in an external hard drive the mouse/keyboard will either totally stop working or start lagging really bad. If I unplug the secondary USB device my mouse and keyboard work again.
I will list my machine and then the steps I have already taken to fix the problem.
( https://www.intel.com/buy/us/en/product/desktop/ibuypower-bb921-34ghz-i7-6700-tower-blackred-pc-pc-552456 )
Windows 10 Pro
i7-6700 CPU @ 3.4 GHz
RAM - 32 GB
GeForce GTX 1060
Motherboard - H170
X2 USB 3.0 Ports on top of tower
X2 USB 3.0 Ports on back of Tower
X2 USB 2.0 Ports on back of tower below the 2 USB 3.0 ports
X1 SSHD - 2 TB (Seagate Hybrid Drive ST2000DX001 2TB)
X1 SSD - 120 GB(ADATA SP550)
X1 HDD - 1 TB(WD Blue)
X1 SSD - 480 GB (SANDISK Ultra II)
X1 SSD - 500 GB (SanDisk SDSSDH-3512gx610)
Logitech Keyboard K530 / M570 Mouse Unifying receiver
Thus far I have gone through every troubleshooting technique I could find on the web for solving this problem.
-Deleting the USB Hubs > Restarting & Reinstalling Drivers
-Testing hardware on another machine with no problems
-Updating the drivers using a few separate techniques found on the web (Can't remember the steps but I do remember it was a few different ways of doing it)
After deleting everything and reinstalling the drivers - it worked for a few hours where I could have my Keyboard/Mouse USB plugged into the 3.0 port and plug in an external hard drive without there being an issue, but then the problem came right back again.
The problem today is exactly the same - Mouse Keyboard works fine, plug in external to adjacent USB 3.0 and the mouse and keyboard stop working while the external opens up and appears to be working. To be more specific, the very INSTANT I plug in the external, the mouse stops working and 1 second later the external directory pops open. I unplug the external and the mouse and keyboard start working again.
I can leave the USB receiver in the 3.0 port on top of the tower and plug the external into any of the 3.0 or 2.0 ports in the back and everything works perfectly.