tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Patching the Synaptics driver to disable tap-to-click
Is it worth me trying to formalise a request to have this patch merged?
I feel like I could be missing something obvious, but I couldn't find
existing support for this reading through `man pms` or trying to tweak
the existing settings. I've made the changes so the default behaviour
doesn't change at all. I've built and am running this on a Thinkpad x270
and it's massively improved my trackpad experience.
--- /usr/src/sys/dev/pckbport/synaptics.c.orig 2024-06-22 11:02:05.000000000 +0100
+++ /usr/src/sys/dev/pckbport/synaptics.c 2026-04-22 17:21:33.087414774 +0100
@@ -118,6 +118,7 @@
static int synaptics_button_boundary = SYNAPTICS_EDGE_BOTTOM;
static int synaptics_button2;
static int synaptics_button3;
+static int synaptics_tap_to_click = 1;
static int synaptics_two_fingers_emul = 0;
static int synaptics_scale_x = 8;
static int synaptics_scale_y = 8;
@@ -155,6 +156,7 @@
static int synaptics_edge_motion_delta_nodenum;
static int synaptics_finger_high_nodenum;
static int synaptics_finger_low_nodenum;
+static int synaptics_tap_to_click_nodenum;
static int synaptics_two_fingers_emul_nodenum;
static int synaptics_scale_x_nodenum;
static int synaptics_scale_y_nodenum;
@@ -865,6 +867,18 @@
if ((rc = sysctl_createv(clog, 0, NULL, &node,
CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
+ CTLTYPE_INT, "tap_to_click",
+ SYSCTL_DESCR("Enable tap to click"),
+ pms_sysctl_synaptics_verify, 0,
+ &synaptics_tap_to_click,
+ 0, CTL_HW, root_num, CTL_CREATE,
+ CTL_EOL)) != 0)
+ goto err;
+
+ synaptics_tap_to_click_nodenum = node->sysctl_num;
+
+ if ((rc = sysctl_createv(clog, 0, NULL, &node,
+ CTLFLAG_PERMANENT | CTLFLAG_READWRITE,
CTLTYPE_INT, "two_fingers_emulation",
SYSCTL_DESCR("Map two fingers to middle button"),
pms_sysctl_synaptics_verify, 0,
@@ -1101,6 +1115,10 @@
if (t < 0 || t > 3)
return (EINVAL);
} else
+ if (node.sysctl_num == synaptics_tap_to_click_nodenum) {
+ if (t < 0 || t > 1)
+ return (EINVAL);
+ } else
if (node.sysctl_num == synaptics_two_fingers_emul_nodenum) {
if (t < 0 || t > 2)
return (EINVAL);
@@ -2293,7 +2311,7 @@
/*
* Do gesture processing only if we didn't detect a palm.
*/
- if (palm == 0)
+ if (palm == 0 && synaptics_tap_to_click)
synaptics_gesture_detect(sc, sp, fingers);
else
sc->gesture_type = sc->gesture_buttons = 0;
Home |
Main Index |
Thread Index |
Old Index