Chosen Solution

Recently, I got a Dell P2414H monitor and connected it to my MacBook Air (2017) through a thunderbolt 2 adapter (Mini display port) and everything goes fine other than when I try to connect my mouse and keyboard to the monitor, I have to connect them to my MacBook not the physical monitor. Is there a fix so I will not need to use a usb doc?

the mouse and keyboard works through the macbook because thats what the drivers work through therefore wont work on an external monitor