Address the new haptic touchpad in the shipping xps

This commit is contained in:
David Heinemeier Hansson
2026-04-10 06:10:38 -04:00
parent 5fb06d2d77
commit 111307fba3
3 changed files with 23 additions and 9 deletions
+2 -3
View File
@@ -11,7 +11,6 @@ Trigger protocol used by these Synaptics touchpads.
import fcntl, glob, os, struct, sys
VENDOR = "06CB"
PRODUCT = "D01A"
REPORT_ID = 0x37
INTENSITY = 40 # 0-100
@@ -34,7 +33,7 @@ def find_hidraw():
try:
with open(uevent) as f:
content = f.read().upper()
if f"0000{VENDOR}" in content and f"0000{PRODUCT}" in content:
if f"0000{VENDOR}" in content:
return os.path.join("/dev", os.path.basename(path))
except OSError:
continue
@@ -46,7 +45,7 @@ def find_touchpad_event():
try:
with open(path) as f:
name = f.read().strip().upper()
if VENDOR in name and PRODUCT in name and "TOUCHPAD" in name:
if VENDOR in name and "TOUCHPAD" in name:
event = path.split("/")[-3]
return os.path.join("/dev/input", event)
except OSError: