One-Key KVM Switching: Mac + Linux PC with Dell U3225QE
Hardware Setup - Mac connected via USB-C (video + USB hub uplink) - Linux PC connected via DisplayPort (video) + USB-B (USB hub uplink) - Logitech receiver...
Hardware Setup
- Mac connected via USB-C (video + USB hub uplink)
- Linux PC connected via DisplayPort (video) + USB-B (USB hub uplink)
- Logitech receiver plugged into a USB-A downstream port on the monitor
- KVM configured in Dell OSD:
Others → USB Selection— USB-C upstream linked to USB-C input, USB-B upstream linked to DP input
This makes the monitor's USB hub (and thus keyboard/mouse) follow the active display input automatically.
Mac Side — Automator Quick Action + m1ddc
Install m1ddc:
bash
brew install m1ddcCreate the shortcut:
- Open Automator → New → Quick Action
- Set "Workflow receives" to no input, in any application
- Add a Run Shell Script action, shell:
/bin/zsh - Script content:
bash
/opt/homebrew/bin/m1ddc set input 15- Save as e.g. "Switch to PC"
Assign keyboard shortcut: System Settings → Keyboard → Keyboard Shortcuts → Services → General — find "Switch to PC" and assign e.g. ⌥⌘P
Linux Side — ddcutil + XFCE Keyboard Shortcut
Install ddcutil and add user to i2c group:
bash
sudo apt install ddcutil
sudo usermod -aG i2c $USERLog out and back in.
Assign keyboard shortcut: XFCE Settings → Keyboard → Application Shortcuts → Add:
bash
/usr/bin/ddcutil setvcp 60 0x19Assign the same or equivalent shortcut, e.g. Ctrl+Alt+P
Input Source Reference
| Input | Code |
|---|---|
| DisplayPort (Linux PC) | 0x0f (15) |
| USB-C (Mac) | 0x19 (25) |
Result
One keypress on either machine switches display input, keyboard, and mouse simultaneously.