From nobody Fri Sep 06 18:35:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X0lK52N4pz5VS2B; Fri, 06 Sep 2024 18:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0lK51YT4z4Vx7; Fri, 6 Sep 2024 18:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725647721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pYWR3CZOF+QBCyYylU+XkdfOXhnl2+m5oLwRG+w4RIA=; b=Mw7E8knGM470+NZ7jP/+IKupT+C6x+35vQ5FDaFrFD2ihq6FrkUs2MtyOk1Nm4aW1Z7I0h 5OKCb/NlJdcjoJaSrFW7eF/7V/xjEfJz3wfFpLoEWPVdJ5nZkZ8fQ6eWnSUCLeEXXVrdnl NOidfwzHf05jW+R6MVg3OkMbZrux3VENFAWyL8eXCmjRBNMpreBbbEGFTDKMiWrB5TANyE OIMSG3SfSDAaHTb1vAlzUmNqHQbehbEMJ2H+yxaOvhvarSuLjMR1pdzx8VOWpGW20+EI2y udglLHYtU5VzzqywncOZZLCfWr4qt8mztSPJbu1TrAZ2m8Yxg0IutoGM3s+2Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725647721; a=rsa-sha256; cv=none; b=w5bKwFBFMzOM+bgqekXSxXbXVKngxer+iHSwaLBx4Uyhs1S1EF0ZvmmEsOOgoNpWJYSQ8u C8f/IdoGFJ1Yka88yxkfLPz//CTKhGqzamzFyUlDUM39l9Gsw3zwa8dsA6NIquI8ncGHa5 g/AHnHwfeJtTK/WS0EORHZiN/8NbdGfLP3CSaVAS9GrNgdGLzoaN5YjamzLaFZQ97Y0nXC NbJh9kYTdUwUupNjSFax7A0M89GYiceUYzhqk8W94XgoYTOFevdxM4h8iYqVqxTYDdKOsD T+xQAJlM8W4i6poPOgWU5fQsmXlj/I35w3phGqNcMnDkJ/qROvxZH6C+9NeLuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725647721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pYWR3CZOF+QBCyYylU+XkdfOXhnl2+m5oLwRG+w4RIA=; b=ia4CWyPrviZEr0tfdH4fP0O9zj0cJJsw6LTEFk56qveGG8EhZSY8lVRtRgQblG5vHITcrD HqfmomKuCatmF/CYIZou1chqyWAsGDAQPLyMjBop4KBzhDZ9wGgiih6+mp8WFaxkUw4wZG 8TzZh2CRaH0pAP8KwVPXyrM6J9/EwKYDjIHa44vb6jNIdcgKTSsebDZkHNb+Xs0UNeyvy7 2dNNNVpjuZC7cyhmjVRuyV7c0Px18BpjuprKJD4Bnf1Lr4ti+oDApxH2LYOh8iw98t5kJI fuwrRvD/DV2iBqfMqiRyq8ONqbowdggTpQerUVjdyQfkiK1KDwUKmFlNogcicg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X0lK510Nbz12Z5; Fri, 6 Sep 2024 18:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 486IZLKQ011193; Fri, 6 Sep 2024 18:35:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 486IZLRw011190; Fri, 6 Sep 2024 18:35:21 GMT (envelope-from git) Date: Fri, 6 Sep 2024 18:35:21 GMT Message-Id: <202409061835.486IZLRw011190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7b984d5043f2 - main - wsp: Allow the trackpad to be used after a partially unreleased click. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b984d5043f2cab8ba05082366e48116e0d495a2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b984d5043f2cab8ba05082366e48116e0d495a2 commit 7b984d5043f2cab8ba05082366e48116e0d495a2 Author: Joshua Rogers AuthorDate: 2024-05-27 15:46:29 +0000 Commit: Warner Losh CommitDate: 2024-09-06 18:34:31 +0000 wsp: Allow the trackpad to be used after a partially unreleased click. This provides functionality for a click which is partially unreleased and then allows the user to continue moving the mousepad as if were not invoked as a full click Signed-off-by: Joshua Rogers Reviewed by: imp, wulf Pull Request: https://github.com/freebsd/freebsd-src/pull/1365 --- share/man/man4/wsp.4 | 5 +++++ sys/dev/usb/input/wsp.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/share/man/man4/wsp.4 b/share/man/man4/wsp.4 index 39660a53ee9a..bcbbc1b8bb5d 100644 --- a/share/man/man4/wsp.4 +++ b/share/man/man4/wsp.4 @@ -65,6 +65,11 @@ Pointer sensitivity can be controlled using the sysctl tunable 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). +Movement on the trackpad following a partially-released click can be +controlled using the sysctl tunable +.Nm hw.usb.wsp.enable_single_tap_movement , +set to 0 to disable the movement on the trackpad until a full release +or 1 to allow the continued movement (default). Z-Axis sensitivity can be controlled using the sysctl tunable .Nm hw.usb.wsp.z_factor . Z-Axis inversion can be controlled using the sysctl tunable diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c index f1931c9e03c0..4527278295ca 100644 --- a/sys/dev/usb/input/wsp.c +++ b/sys/dev/usb/input/wsp.c @@ -99,6 +99,7 @@ static struct wsp_tuning { int pressure_tap_threshold; int scr_hor_threshold; int enable_single_tap_clicks; + int enable_single_tap_movement; } wsp_tuning = { @@ -110,6 +111,7 @@ static struct wsp_tuning { .pressure_tap_threshold = 120, .scr_hor_threshold = 20, .enable_single_tap_clicks = 1, + .enable_single_tap_movement = 1, }; static void @@ -123,6 +125,7 @@ wsp_runing_rangecheck(struct wsp_tuning *ptun) 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); + WSP_CLAMP(ptun->enable_single_tap_movement, 0, 1); } SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RWTUN, @@ -141,6 +144,9 @@ 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"); +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, enable_single_tap_movement, CTLFLAG_RWTUN, + &wsp_tuning.enable_single_tap_movement, 0, "enable single tap movement"); + /* * Some tables, structures, definitions and constant values for the @@ -1149,8 +1155,8 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error) dx = sc->pos_x[0] - sc->pre_pos_x; dy = sc->pos_y[0] - sc->pre_pos_y; - /* Ignore movement during button is releasing */ - if (sc->ibtn != 0 && sc->sc_status.button == 0) + /* Optionally ignore movement during button is releasing */ + if (tun.enable_single_tap_movement != 1 && sc->ibtn != 0 && sc->sc_status.button == 0) dx = dy = 0; /* Ignore movement if ntouch changed */