aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/input
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-03-01 04:27:58 +0000
committerWarner Losh <imp@FreeBSD.org>2017-03-01 04:27:58 +0000
commit450ba47a5df8139966eab1d4cba2a8122a6c8445 (patch)
treea417b8e779d2d04d292a735bfb839a8e03d2a41c /sys/dev/usb/input
parent7b8810a816f6ee7bf5dc23dc11b302df0c29e613 (diff)
Notes
Diffstat (limited to 'sys/dev/usb/input')
-rw-r--r--sys/dev/usb/input/wsp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c
index 694e0d9e7162..6a02618e01f9 100644
--- a/sys/dev/usb/input/wsp.c
+++ b/sys/dev/usb/input/wsp.c
@@ -87,6 +87,7 @@ static struct wsp_tuning {
int pressure_untouch_threshold;
int pressure_tap_threshold;
int scr_hor_threshold;
+ int enable_single_tap_clicks;
}
wsp_tuning =
{
@@ -96,6 +97,7 @@ static struct wsp_tuning {
.pressure_untouch_threshold = 10,
.pressure_tap_threshold = 120,
.scr_hor_threshold = 20,
+ .enable_single_tap_clicks = 1,
};
static void
@@ -107,6 +109,7 @@ wsp_runing_rangecheck(struct wsp_tuning *ptun)
WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255);
WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255);
WSP_CLAMP(ptun->scr_hor_threshold, 1, 255);
+ WSP_CLAMP(ptun->enable_single_tap_clicks, 0, 1);
}
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RWTUN,
@@ -121,6 +124,8 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_tap_threshold, CTLFLAG_RWTUN,
&wsp_tuning.pressure_tap_threshold, 0, "tap pressure threshold");
SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RWTUN,
&wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold");
+SYSCTL_INT(_hw_usb_wsp, OID_AUTO, enable_single_tap_clicks, CTLFLAG_RWTUN,
+ &wsp_tuning.enable_single_tap_clicks, 0, "enable single tap clicks");
/*
* Some tables, structures, definitions and constant values for the
@@ -966,7 +971,7 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error)
*/
switch (sc->ntaps) {
case 1:
- if (!(params->caps & HAS_INTEGRATED_BUTTON)) {
+ if (!(params->caps & HAS_INTEGRATED_BUTTON) || tun.enable_single_tap_clicks) {
wsp_add_to_queue(sc, 0, 0, 0, MOUSE_BUTTON1DOWN);
DPRINTFN(WSP_LLEVEL_INFO, "LEFT CLICK!\n");
}