mirror of
https://github.com/openbsd/src.git
synced 2024-12-22 07:27:59 -08:00
Make scaling available for normal mice, too; not just for touchpads.
Add reverse_scrolling to the manpage. ok bru@
This commit is contained in:
parent
502b52cbdf
commit
c08965e9c1
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user