Short answer is you want all the ports to be compatible with your hardware. HDMI 144hz 1080p is maybe tricky.
KVMs aren't used that much these days. Software KVM or Remote Desktop solutions are the standard. Unless you are gaming on both, don't see the point myself.
You aren't likely to find a reasonably priced KVM that can handle all the features your 144hz monitor has. Even if it supports 144hz, FreeSync over HDMI and other things may not work. Fancy keyboards and mice often have issues with KVM as well. They expect to be connected to a controller, not through a hub, and sometimes the software gets confused when they get disconnected and reconnected. Sometimes they only operate as standard HID devices because the KVM handles all the traffic, and produces a dummy signal so the computer doesn't lose connection to peripherals.
You might have better luck with Display Port since that is the more professional industry standard but you would need to replace your monitor.
HDMI switches are a thing, and they support better HDMI features. Intended use is consoles, PCs, etc. But that is relying on HDMI audio, not a 3.5mm jack. And peripherals are not passed through at all. You could pair an HDMI switch with a more traditional KVM for the peripherals as the problem with most off the shelf KVMs is video issues. But fully featured KVMs are often in the hundreds of dollars, they need a lot of fancy switching to maintain signal integrity at today's bandwidths.
Maybe this one is worth a try on the cheap, it also supports DP:
https://www.amazon.com/Computer-Monitors-Displayport-Switcher-Computers/dp/B0BWLYVK56?ref_=ast_sto_dp&th=1
If you are using the DVI port on your monitor there probably isn't a KVM out there that has HDMI and DVI at the same time.
You'll have to find a separate solution for audio. But such switches are very simple and can be found in lots of places. I used to just keep an extension next to my mousepad and would manually switch.