Skip to content

Commit

Permalink
Consider ID_INPUT_POINTINGSTICK as touchpad
Browse files Browse the repository at this point in the history
Most resistive touchpads don't support ABS coordination nor multitouch.
When both capabilities are absent, the touchpad gets tagged as
ID_INPUT_MOUSE.

Since there's no such device as I2C mouse, if the touchpad is on I2C
bus, it will also get tagged as ID_INPUT_POINTINGSTICK.

To really distinguish a true pointing stick and a resistive touchpad,
the parser needs to find the slibling node created by HID Report
Descriptor and ensure it's a "touchpad" (i.e. ABS or MT capability).
It's not easy to traverse to a sibling node in the current parser, so
simply treat ID_INPUT_POINTINGSTICK as resistive touchpad to resolve the
issue.
  • Loading branch information
khfeng committed Sep 3, 2024
1 parent 0b29388 commit 28c86a9
Show file tree
Hide file tree
Showing 3 changed files with 16,982 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,10 @@ def test_CRYPTO_FDE_UC20(self):
self.assertEqual(len(devices), 93)
self.assertEqual(self.count(devices, "PARTITION"), 1)

def test_RESISTIVE_TOUCHPAD(self):
devices = self.parse("RESISTIVE_TOUCHPAD")
self.assertEqual(self.count(devices, "TOUCHPAD"), 1)

def test_two_dms_one_with_ubutnu_save(self):
"""
This test checks that udevadm parser properly handles the case
Expand Down
Loading

0 comments on commit 28c86a9

Please sign in to comment.