On Sun, 17 May 2020 at 16:17:46 -0700, jo...@armadilloaerospace.com wrote:
> I enabled wsmoused for console mouse support, but the cursor was
> unusably fast. This is a high resolution, high update rate USB gaming
> mouse, but it was off by well over an order of magnitude.
> 
> I searched for a global mouse speed setting, but the only thing I
> found was a "mouse.scale=0,0,0,0,0,0,0" in wsconsctl, and I couldn't
> figure out how to use it even after reading all the source.

That was added for touchscreens, to be manipulated with xtsscale(1).

> No kernel code uses the samples[] array, and the samplelen field is
> interpreted as raw mode when non-0, and scaled by the other values
> when it is 0.

Yes I think samples can go away, it's been there since importing 
from NetBSD and isn't used.

> This explains wsconsctl's mouse.rawmode and mouse.scale[7] values,
> but I still couldn't set them, getting
> WSMOUSEIO_SCALIBCOORDS: Invalid argument for everything I tried.

It's up to the driver (uts(4) for touchscreens, ums(4) for mice) to 
do something with that ioctl, and ums doesn't support it.

> The user visible behavior I want to see is:
> 
> wsconsctl mouse.speed=0.6
> 
> This could overload the existing DX_SCALE value, but that may still
> need to be used independently for touchpad configuration, so I
> think it would be better to define a new WSMOUSECFG_SPEED
> parameter with the same *.12 fixed point format as
> WSMOUSECFG_DX_SCALE.
> 
> If this sounds reasonable, I will go ahead and make a diff for the
> kernel and wsconsctl to implement it that with proper residuals.

In X11 one can adjust mouse speed with xset(1), maybe it's easier to 
work with the raw values in wsmoused and add a scaling knob there?  
I see there's already code in wsmoused's normalize_event() to adjust 
speed.

> For additional cleanup to make it net-negative-LoC, could everything
> relating to struct wsmouse_calibcoords go away completely? It looks
> like all the fields are now replicated as wsmousecfg parms and
> handled at the wsmouse level for the touchpad case, so doing it at
> the usb device or other level is redundant, as well as being broken
> for relative moves.
> 
> It would be nice to use parms for everything, also getting rid of
> WSMOUSEIO_GTYPE and WSMOUSEIO_SRES.

WSMOUSEIO_GTYPE is used by a few X11 input drivers that talk to 
wscons.

I think WSMOUSEIO_SRES can be removed.

Reply via email to