Well the first place I like to start is libinput. You need to identify the touchpad and look at the events.
libinput list-devices
libinput debug-tablet
Device: PNP0C50:08 36B6:C001 TouchPad
Kernel: /dev/input/event15
Id: ...
Group: 8
Seat: seat0, default
Size: 134x88mm
Capabilities: pointer gesture
Tap-to-click: disabled
Tap-and-drag: enabled
Tap button map: left/right/middle
Tap drag lock: disabled
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: *two-finger edge
Scroll button: n/a
Scroll button lock: n/a
Click methods: *button-areas clickfinger
Clickfinger button map: left/right/middle
Disable-w-typing: enabled
Disable-w-trackpointing: enabled
Accel profiles: flat *adaptive custom
Rotation: n/a
Area rectangle: n/a
% doas libinput debug-tablet /dev/input/event15
Password:
libinput error: event15 - PNP0C50:08 36B6:C001 TouchPad: kernel bug: clickpad advertising right button. See
https://wayland.freedesktop.org/libinput/doc/1.28.1/clickpad-with-right-button.html for details (touchpad has right button)
No device connected
No tool in proximity
libinput:
tip: up
x: 0.00 [|-----------------------------------------------------]
y: 0.00 [|-----------------------------------------------------]
tilt x: 0.00 [---------------------------|--------------------------]
tilt y: 0.00 [---------------------------|--------------------------]
dist: 0.00 [|-----------------------------------------------------]
pressure: 0.00 [|-----------------------------------------------------]
rotation: 0.00 [|-----------------------------------------------------]
slider: 0.00 [---------------------------|--------------------------]
buttons:
evdev:
ABS_X: 0.00 [|-----------------------------------------------------]
ABS_Y: 0.00 [|-----------------------------------------------------]
ABS_Z: 0.00 [|-----------------------------------------------------]
ABS_TILT_X: 0.00 [|-----------------------------------------------------]
ABS_TILT_Y: 0.00 [|-----------------------------------------------------]
ABS_DISTANCE: 0.00 [|-----------------------------------------------------]
ABS_PRESSURE: 0.00 [|-----------------------------------------------------]
buttons:
^C