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 -2
View File
@@ -250,7 +250,7 @@
<p class="eyebrow">Alienware-Only Targeting</p>
<h1>Internal KVM Switch Dashboard</h1>
<p>
Samsung is trigger-only. This device switches Alienware AW3423DWF when Samsung input matches the configured local port code: DP1 = 15, DP2 = 19 (or 16 on some setups), HDMI = 17.
When the auxiliary external monitor is present, this device enforces the configured Alienware AW3423DWF input (DP1, DP2, or HDMI).
</p>
</section>
@@ -362,7 +362,7 @@
stat("Samsung Present", payload.samsung_present ? "Yes" : "No"),
stat("Trigger Input", payload.trigger_input_code),
stat("Trigger Target Port", payload.trigger_target_port),
stat("Trigger Matches This Device Port", payload.trigger_matches_device_port ? "Yes" : "No"),
stat("External Monitor Triggered", payload.trigger_matches_device_port ? "Yes" : "No"),
stat("Alienware Detected", payload.alienware_detected ? "Yes" : "No"),
stat("Alienware Input", payload.alienware_input_code),
stat("Attempted This Samsung Session", payload.samsung_session_attempted ? "Yes" : "No"),