summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/wsconsctl/mouse.c8
-rw-r--r--sbin/wsconsctl/mousecfg.c3
-rw-r--r--share/man/man4/wsmouse.414
3 files changed, 15 insertions, 10 deletions
diff --git a/sbin/wsconsctl/mouse.c b/sbin/wsconsctl/mouse.c
index c880c92b57b..84cd656e935 100644
--- a/sbin/wsconsctl/mouse.c
+++ b/sbin/wsconsctl/mouse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mouse.c,v 1.21 2023/07/02 21:44:04 bru Exp $ */
+/* $OpenBSD: mouse.c,v 1.22 2024/10/05 13:27:16 chrisz Exp $ */
/* $NetBSD: mouse.c,v 1.3 1999/11/15 13:47:30 ad Exp $ */
/*-
@@ -58,13 +58,14 @@ struct field mouse_field_tab[] = {
/* touchpad-specific options: */
{ "tp.tapping", &cfg_tapping, FMT_CFG, FLG_NORDBACK },
{ "tp.mtbuttons", &cfg_mtbuttons, FMT_CFG, FLG_NORDBACK },
- { "tp.scaling", &cfg_scaling, FMT_CFG, FLG_NORDBACK },
+ { "tp.scaling", &cfg_scaling, FMT_CFG, FLG_NORDBACK | FLG_WRONLY },
{ "tp.swapsides", &cfg_swapsides, FMT_CFG, FLG_NORDBACK },
{ "tp.disable", &cfg_disable, FMT_CFG, FLG_NORDBACK },
{ "tp.edges", &cfg_edges, FMT_CFG, FLG_NORDBACK },
{ "tp.param", &cfg_param, FMT_CFG, FLG_WRONLY },
- /* Add an alias. This field is valid for all wsmouse devices. */
+ /* Add aliases. These fields are valid for all wsmouse devices. */
{ "param", &cfg_param, FMT_CFG, FLG_WRONLY },
+ { "scaling", &cfg_scaling, FMT_CFG, FLG_NORDBACK },
{ NULL }
};
@@ -106,6 +107,7 @@ mouse_init(int devfd, int devidx) {
for (f = mouse_field_tab; f->name != NULL; f++)
if (f->format == FMT_CFG) {
if (f->valp != &cfg_param
+ && f->valp != &cfg_scaling
&& f->valp != &cfg_revscroll)
f->flags |= FLG_DEAD;
else
diff --git a/sbin/wsconsctl/mousecfg.c b/sbin/wsconsctl/mousecfg.c
index 3b9d0da28fb..b813e13050a 100644
--- a/sbin/wsconsctl/mousecfg.c
+++ b/sbin/wsconsctl/mousecfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mousecfg.c,v 1.11 2024/09/25 19:56:33 bru Exp $ */
+/* $OpenBSD: mousecfg.c,v 1.12 2024/10/05 13:27:16 chrisz Exp $ */
/*
* Copyright (c) 2017 Ulf Brosziewski
@@ -356,6 +356,7 @@ mousecfg_pr_field(struct wsmouse_parameters *field)
if (field == &cfg_scaling) {
value = get_value(field, WSMOUSECFG_DX_SCALE);
+ value = value == 0 ? 4096 : value;
f = (float) value / 4096;
printf("%.3f", f);
return;
diff --git a/share/man/man4/wsmouse.4 b/share/man/man4/wsmouse.4
index 549d52e51a2..50e100f521b 100644
--- a/share/man/man4/wsmouse.4
+++ b/share/man/man4/wsmouse.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: wsmouse.4,v 1.23 2023/07/02 21:44:04 bru Exp $
+.\" $OpenBSD: wsmouse.4,v 1.24 2024/10/05 13:27:16 chrisz Exp $
.\" $NetBSD: wsmouse.4,v 1.3 1999/12/06 14:52:08 augustss Exp $
.\"
.\" Copyright (c) 2018 Ulf Brosziewski <bru@openbsd.org>
@@ -26,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 2 2023 $
+.Dd $Mdocdate: October 5 2024 $
.Dt WSMOUSE 4
.Os
.Sh NAME
@@ -86,6 +86,12 @@ If
is omitted, commands apply to
.Pa /dev/wsmouse0 .
.Bl -tag -width Ds
+.It Cm mouse.reverse_scrolling
+Reverse direction of scrolling.
+.It Cm mouse.scaling
+The value is a scale coefficient that is applied to the relative
+coordinates.
+It determines the base speed of the pointer.
.It Cm mouse.tp.tapping
Contacts on the touchpad that are immediately released again can
be mapped to mouse button clicks.
@@ -110,10 +116,6 @@ until that touch ends
This feature is supported for some clickpads.
If enabled, two-finger clicks - with the fingers side by side - generate
left-button events, and three-finger clicks generate middle-button events.
-.It Cm mouse.tp.scaling
-The value is a scale coefficient that is applied to the relative
-coordinates.
-It determines the base speed of the pointer.
.It Cm mouse.tp.swapsides
If this parameter has a non-zero value, the order of software
button areas is inverted.