Date: Sat, 27 Jan 2018 06:10:21 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328460 - in stable/11: share/man/man4 sys/dev/usb/input Message-ID: <201801270610.w0R6AL5x071419@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Sat Jan 27 06:10:20 2018 New Revision: 328460 URL: https://svnweb.freebsd.org/changeset/base/328460 Log: MFC r314467,r328027: Add hw.usb.wsp.enable_single_tap_clicks sysctl MFC r314467 (imp): Make wsp process a single touchpad tap and interpret it as a left-click event. It can be disabled by setting the new hw.usb.wsp.enable_single_tap_clicks sysctl to 0. MFC r328027: wsp(4): Update to reflect new sysctl from r314467 r314467 introduced hw.usb.wsp.enable_single_tap_clicks to enable/disable single-tap left click behavior. Update the man page to reflect the new sysctl. PR: 196624 Modified: stable/11/share/man/man4/wsp.4 stable/11/sys/dev/usb/input/wsp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/wsp.4 ============================================================================== --- stable/11/share/man/man4/wsp.4 Sat Jan 27 05:56:16 2018 (r328459) +++ stable/11/share/man/man4/wsp.4 Sat Jan 27 06:10:20 2018 (r328460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2014 +.Dd January 15, 2018 .Dt WSP 4 .Os .Sh NAME @@ -63,6 +63,9 @@ through nodes under .Nm hw.usb.wsp . Pointer sensitivity can be controlled using the sysctl tunable .Nm hw.usb.wsp.scale_factor . +Tap to left-click can be controlled using the sysctl tunable +.Nm hw.usb.wsp.enable_single_tap_clicks , +set to 0 to disable single tap clicks or 1 to enable them (default). .Sh FILES .Nm creates a blocking pseudo-device file, Modified: stable/11/sys/dev/usb/input/wsp.c ============================================================================== --- stable/11/sys/dev/usb/input/wsp.c Sat Jan 27 05:56:16 2018 (r328459) +++ stable/11/sys/dev/usb/input/wsp.c Sat Jan 27 06:10:20 2018 (r328460) @@ -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_thresho &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 e */ 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"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801270610.w0R6AL5x071419>