Diagnosis
The KVM function (keyboard/video/mouse switch) is semi-automatic and tied to the specific USB upstream ports, not just the video input. It won't work if the USB peripherals aren't routed correctly.
How to Fix It
You need to connect both computers to the monitor's USB hub. Connect your desktop PC to the square 'USB-B Upstream' port with the provided cable. Connect your laptop to one of the 'USB-C' or 'USB-A Downstream' ports (if using USB-C for video, it handles data too). Your keyboard and mouse plug into the monitor's yellow 'KVM' USB ports. To switch, press the monitor's joystick to open the OSD, go to 'Input Select', and choose your video source (e.g., HDMI 1). The USB peripherals should automatically switch to the corresponding USB upstream connection (USB-B for DP, USB-C for the laptop).
If That Didn't Work
The auto-switch can be flaky. Go to the OSD under 'Setup' -> 'USB Switch' and change it from 'Auto' to 'Manual'. Now, after you switch the video input with the joystick, you'll need to manually select the corresponding USB source (USB-B or USB-C) from the same 'USB Switch' menu.
Heads Up
The KVM only works between the two designated upstream connections: the USB-B port and the USB-C port. You can't use two HDMI sources with KVM, for example.