From owner-svn-src-all@freebsd.org Sat Jan 27 06:10:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE0F1EDF5EE; Sat, 27 Jan 2018 06:10:21 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C1F7783A6; Sat, 27 Jan 2018 06:10:21 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6848626764; Sat, 27 Jan 2018 06:10:21 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0R6ALR5071421; Sat, 27 Jan 2018 06:10:21 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0R6AL5x071419; Sat, 27 Jan 2018 06:10:21 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801270610.w0R6AL5x071419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 27 Jan 2018 06:10:21 +0000 (UTC) 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 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/usb/input X-SVN-Commit-Revision: 328460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2018 06:10:22 -0000 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"); }