Refactor KVM switch logic to enforce input source based on auxiliary monitor presence and update related documentation and tests

This commit is contained in:
Lago
2026-03-27 16:05:20 +01:00
parent 3f7c5a0677
commit dc3b67d00a
4 changed files with 111 additions and 42 deletions
+2 -3
View File
@@ -17,14 +17,13 @@ Configure only one value per machine:
- this device Alienware target port: `DP1`, `DP2`, or `HDMI`
- optional auxiliary trigger monitor: selected in UI; if not set, auto-detection is used
Samsung trigger input codes mapped by port:
Samsung trigger input codes (for diagnostics only):
- `DP1` -> `15`
- `DP2` -> `19` (or `16` on some setups)
- `HDMI` -> `17`
- If Samsung trigger input matches this device port code, the app runs `monitor.set_input_source(<PORT>)` on `AW3423DWF` via `monitorcontrol`.
- If it does not match, the app waits.
- If the auxiliary external monitor is present, the app checks Alienware current input and enforces the configured `device_port` via `monitorcontrol`.
Retry behavior: