Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wsmux(4) [netbsd man page]

WSMUX(4)						   BSD Kernel Interfaces Manual 						  WSMUX(4)

NAME
wsmux -- console keyboard/mouse multiplexor for wscons SYNOPSIS
wskbd* at ... mux 1 wsmouse* at ... mux 0 pseudo-device wsmux DESCRIPTION
The wsmux is a pseudo-device driver that allows several wscons(4) input devices to have their events multiplexed into one stream. The typical usage for this device is to have two multiplexors, one for mouse events and one for keyboard events. All wsmouse(4) devices should direct their events to the mouse mux (normally 0) and all keyboard devices, except the console, should direct their events to the key- board mux (normally 1). A device will send its events to the mux indicated by the mux locator. If none is given the device will not use a multiplexor. The keyboard multiplexor should be connected to the display, using the wsconscfg(8) command. It will then receive all key- strokes from all keyboards and, furthermore, keyboards can be dynamically attached and detached without further user interaction. In a simi- lar way, the window system will open the mouse multiplexor and receive all mouse events; mice can also be dynamically attached and detached. If a wskbd(4) or wsmouse(4) device is opened despite having a mux it will be detached from the mux. It is also possible to inject events into a multiplexor from a user program. FILES
For each mux device, /dev/wsmuxN there is a control device /dev/wsmuxctlN. The control device has a minor number 128 greater than the regu- lar mux device. It can be used to control the mux even when it is open, e.g., by wsmuxctl(8). /dev/wsmouse a.k.a. /dev/wsmux0 /dev/wskbd a.k.a. /dev/wsmux1 /usr/include/dev/wscons/wsconsio.h SEE ALSO
wscons(4), wsdisplay(4), wskbd(4), wsmouse(4), moused(8), wsconscfg(8), wsconsctl(8), wsfontload(8), wsmoused(8), wsmuxctl(8) BSD
July 26, 1999 BSD

Check Out this Related Man Page

WSMOUSE(9)						   BSD Kernel Developer's Manual						WSMOUSE(9)

NAME
wsmouse, wsmouse_input, wsmousedevprint -- wscons mouse support SYNOPSIS
#include <dev/wscons/wsconsio.h> #include <dev/wscons/wsmousevar.h> void wsmouse_input(struct device *msdev, u_int btns, int x, int y, int z, int w, u_int flags); int wsmousedevprint(void *aux, const char *pnp); DESCRIPTION
The wsmouse module is a component of the wscons(9) framework to provide machine-independent mouse support. Most of the support is provided by the wsmouse(4) device driver, which must be a child of the hardware device driver. DATA TYPES
Mouse drivers providing support for wscons pointer devices will make use of the following data types: struct wsmouse_accessops A structure used to specify the mouse access functions. All pointer devices must provide this structure and pass it to the wsmouse(4) child device. It has the following members: int (*enable)(void *); int (*ioctl)(void *v, u_long cmd, void *data, int flag, struct lwp *l); void (*disable)(void *); The enable member defines the function to be called to enable monitoring pointer movements and passing these events to wscons. The disable member defines the function to disable movement events. The ioctl member defines the function to be called to perform mouse-specific ioctl calls. There is a void * cookie provided by the mouse driver associated with these functions, which is passed to them when they are invoked. struct wsmousedev_attach_args A structure used to attach the wsmouse(4) child device. It has the following members: const struct wsmouse_accessops *accessops; void *accesscookie; FUNCTIONS
wsmouse_input(msdev, btns, x, y, z, w, flags) Callback from the mouse driver to the wsmouse interface driver. Arguments are as follows: msdev This is the struct device pointer passed from config_found() on attaching the child wsmouse(4) to specify the mouse device. btns This specifies the current button status. Bits for pressed buttons (which will cause the WSCONS_EVENT_MOUSE_DOWN event on wsmouse(4) device) should be set, and bits for released buttons (which will cause the WSCONS_EVENT_MOUSE_UP event) should be zero. The left most button state should be in LSB, i.e. for typical three button mouse, the left button is 0x01, the middle button is 0x02, and the right button is 0x04. x Absolute or relative X-axis value to specify the pointer coordinate. Rightward (moving the mouse right) is positive. y Absolute or relative Y-axis value to specify the pointer coordinate. Upward (moving the mouse forward) is positive. Note that this aspect is opposite from the one used in the X server dix layer. z Absolute or relative Z-axis value to specify the pointer coordinate. Usually this axis is used for the wheel. Downward (turning the wheel backward) is positive. w Absolute or relative W-axis value to specify the pointer coordinate. Usually this axis would be used for the horizontal com- ponent of the wheel. flags This argument specifies whether the pointer device and the measurement of the x, y, z, and w axes is in relative or absolute mode. Valid values for flags are: WSMOUSE_INPUT_DELTA Relative mode. WSMOUSE_INPUT_ABSOLUTE_X Absolute mode in x axis. WSMOUSE_INPUT_ABSOLUTE_Y Absolute mode in y axis. WSMOUSE_INPUT_ABSOLUTE_Z Absolute mode in z axis. WSMOUSE_INPUT_ABSOLUTE_W Absolute mode in w axis. wsmousedevprint(aux, pnp) The default wsmouse printing routine used by config_found(). (see autoconf(9)). AUTOCONFIGURATION
Mouse drivers which want to use the wsmouse module must be a parent to the wsmouse(4) device and provide an attachment interface. To attach the wsmouse(4) device, the mouse driver must allocate and populate a wsmousedev_attach_args structure with the supported operations and call- backs and call config_found() to perform the attach (see autoconf(9)). OPERATION
When a mouse-movement event is received, the device driver must perform any necessary movement decoding to wscons events and pass the events to wscons via wsmouse_input(). The wscons framework calls back into the hardware driver by invoking the functions that are specified in the accessops structure. The enable() and disable() functions are relatively simple and self-explanatory. The ioctl() function is called by the wscons interface to per- form mouse-specific ioctl operations (see ioctl(2)). The argument cmd to the ioctl() function specifies the specific command to perform using the data data. Valid commands are listed in sys/dev/wscons/wsconsio.h. CODE REFERENCES
The wscons subsystem is implemented within the directory sys/dev/wscons. The wsmouse module itself is implement within the file sys/dev/wscons/wsmouse.c. ioctl(2) operations are listed in sys/dev/wscons/wsconsio.h. SEE ALSO
ioctl(2), pms(4), wscons(4), wsmouse(4), autoconf(9), driver(9), intro(9), wscons(9), wsdisplay(9), wskbd(9) BSD
November 12, 2006 BSD
Man Page