Hi,

the ws(4) mouse driver has the option of emulating the mouse wheel
on motion + a given button is generated.

This is active by default on button 2 on recent Linux systems (those
using libinput).

Should OpenBSD's ws(4) activate it by default too ?

If you want to experiment without rebuilding X you can run the
commands below to enable it

xinput --set-prop --type=int /dev/wsmouse 'WS Pointer Wheel Emulation' 1
xinput --set-prop --type=int /dev/wsmouse 'WS Pointer Wheel Emulation Button' 2

Index: man/ws.man
===================================================================
RCS file: /cvs/OpenBSD/xenocara/driver/xf86-input-ws/man/ws.man,v
retrieving revision 1.14
diff -u -r1.14 ws.man
--- man/ws.man  3 Sep 2016 14:01:16 -0000       1.14
+++ man/ws.man  16 Jun 2018 14:12:49 -0000
@@ -94,7 +94,7 @@
 and
 .B YAxisMapping
 options.
-Default: off.
+Default: on.
 .TP 4
 .BI "Option \*qEmulateWheelButton\*q \*q" integer \*q
 Specifies which button must be held down to enable wheel emulation mode.
@@ -107,7 +107,7 @@
 If the button is 0 and
 .BR EmulateWheel
 is on, any motion of the device is converted into wheel events.
-Default:\ 4.
+Default:\ 2.
 .TP 4
 .BI "Option \*qEmulateWheelInertia\*q \*q" integer \*q
 Specifies how far (in pixels) the pointer must move to generate button
Index: src/emuwheel.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/driver/xf86-input-ws/src/emuwheel.c,v
retrieving revision 1.3
diff -u -r1.3 emuwheel.c
--- src/emuwheel.c      25 Dec 2015 15:08:28 -0000      1.3
+++ src/emuwheel.c      16 Jun 2018 14:12:49 -0000
@@ -178,9 +178,9 @@
        int button, inertia, timeout;
 
        priv->emulateWheel.enabled = xf86SetBoolOption(pInfo->options,
-           "EmulateWheel", FALSE);
+           "EmulateWheel", TRUE);
 
-       button = xf86SetIntOption(pInfo->options, "EmulateWheelButton", 4);
+       button = xf86SetIntOption(pInfo->options, "EmulateWheelButton", 2);
        if (button < 0 || button > NBUTTONS) {
                xf86IDrvMsg(pInfo, X_WARNING,
                    "Invalid EmulateWheelButton value: %d\n", button);

-- 
Matthieu Herrb

Reply via email to