p The .Xr wsconsctl 8 utility gives access to several configurable details that affect this driver. .Ss Ioctls The following .Xr ioctl 2 calls are provided by the .Nm driver or by devices which use it. Their definitions are found in
a dev/wscons/wsconsio.h . l -tag -width Dv t Dv WSMOUSEIO_GETPARAMS Pq Li "struct wsmouse_parameters" t Dv WSMOUSEIO_SETPARAMS Pq Li "struct wsmouse_parameters" Obtain and set various mouse parameters as a key/value set. Currently these primarily relate to touchpads. The structure .Vt struct wsmouse_parameters is defined as follows: d -literal -offset indent struct wsmouse_param { enum wsmousecfg key; int value; }; struct wsmouse_parameters { struct wsmouse_param *params; unsigned int nparams; }; .Ed
p The number of parameters to read or write must be specified in .Va nparams . For each parameter, when .Dv WSMOUSEIO_GETPARAMS is used, a key must be specified. When .Dv WSMOUSEIO_SETPARAMS is used, a key and a value must be specified. A single ioctl may retrieve up to .Dv WSMOUSECFG_MAX .Va nparams . t Dv WSMOUSEIO_GETREPEAT Pq Li "struct wsmouse_repeat" Retrieve the current automatic button repeating configuration. The structure returned is as follows: d -literal -offset indent struct wsmouse_repeat { unsigned long wr_buttons; unsigned int wr_delay_first; unsigned int wr_delay_decrement; unsigned int wr_delay_minimum; }; .Ed
p The .Va wr_buttons field is a bit mask that specifies which buttons send press and release events periodically while they are physically held down. The least significant bit corresponds to button 0.
p The other three fields describe the frequency upon which these automatic events are sent. .Va wr_delay_first specifies the milliseconds before the first repeated event is sent. .Va wr_delay_decrement is used to calculate the delay between the most recently generated event and the forthcoming one: the previous delay is taken and it is decreased by the value given in this variable. .Va wr_delay_minimum specifies the minimum delay, in milliseconds, between two consecutive events. t Dv WSMOUSEIO_SETREPEAT Pq Li "struct wsmouse_repeat" Set the automatic button repeating configuration. See .Dv WSMOUSEIO_GETREPEAT above for more details. t Dv WSMOUSEIO_SETVERSION Pq Li "int" Set the wscons_event protocol version. The default is 0 for binary compatibility. The latest version is always available as .Dv WSMOUSE_EVENT_VERSION , and is currently 1. All new code should use a call similar to the below to ensure the correct version is returned. d -literal -offset indent int ver = WSMOUSE_EVENT_VERSION; if (ioctl(fd, WSMOUSEIO_SETVERSION, &ver) == -1) err(EXIT_FAILURE, "cannot set version"); .Ed .El .Sh FILES l -item t
a /usr/include/dev/wscons/wsconsio.h . .El .Sh SEE ALSO .Xr btms 4 , .Xr dreamcast/mms 4 , .Xr i386/lms 4 , .Xr i386/mms 4 , .Xr pms 4 , .Xr uep 4 , .Xr ums 4 , .Xr uts 4 , .Xr wscons 4 , .Xr wsmux 4 , .Xr moused 8 , .Xr wsconsctl 8 , .Xr wsmoused 8 , .Xr wsmouse 9