2019-08-13 16:22:16 +03:00
|
|
|
.\" $NetBSD: wsmux.4,v 1.17 2019/08/13 13:22:16 uwe Exp $
|
1999-07-29 22:20:02 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2019-08-13 10:09:49 +03:00
|
|
|
.Dd August 13, 2019
|
1999-07-29 22:20:02 +04:00
|
|
|
.Dt WSMUX 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm wsmux
|
1999-12-16 01:07:30 +03:00
|
|
|
.Nd console keyboard/mouse multiplexor for wscons
|
1999-07-29 22:20:02 +04:00
|
|
|
.Sh SYNOPSIS
|
2017-06-13 09:37:21 +03:00
|
|
|
.Cd "wskbd* at ... mux 1"
|
|
|
|
.Cd "wsbell* at ... mux 1"
|
|
|
|
.Cd "wsmouse* at ... mux 0"
|
1999-07-29 22:20:02 +04:00
|
|
|
.Pp
|
2001-10-13 21:15:33 +04:00
|
|
|
.Cd pseudo-device wsmux
|
1999-07-29 22:20:02 +04:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
is a pseudo-device driver that allows several
|
|
|
|
.Xr wscons 4
|
|
|
|
input devices to have their events multiplexed into one stream.
|
|
|
|
.Pp
|
|
|
|
The typical usage for this device is to have two multiplexors, one
|
2017-06-13 09:37:21 +03:00
|
|
|
for mouse events and one for keyboard and bell events.
|
2011-03-06 20:39:05 +03:00
|
|
|
All
|
1999-07-29 22:20:02 +04:00
|
|
|
.Xr wsmouse 4
|
|
|
|
devices should direct their events to the mouse mux (normally 0)
|
|
|
|
and all keyboard devices, except the console, should direct their
|
2011-03-06 20:39:05 +03:00
|
|
|
events to the keyboard mux (normally 1).
|
|
|
|
A device will send its events to the mux indicated by the
|
1999-07-29 22:20:02 +04:00
|
|
|
.Va mux
|
2011-03-06 20:39:05 +03:00
|
|
|
locator.
|
|
|
|
If none is given the device will not use a multiplexor.
|
1999-07-29 22:20:02 +04:00
|
|
|
The keyboard multiplexor should be connected to the display, using
|
|
|
|
the
|
|
|
|
.Xr wsconscfg 8
|
2011-03-06 20:39:05 +03:00
|
|
|
command.
|
|
|
|
It will then receive all keystrokes from all keyboards
|
1999-07-29 22:20:02 +04:00
|
|
|
and, furthermore, keyboards can be dynamically attached and detached without
|
|
|
|
further user interaction.
|
2017-06-13 09:37:21 +03:00
|
|
|
Additionally, bell events generated for the display will be directed to
|
|
|
|
all attached
|
|
|
|
.Xr wsbell 4
|
|
|
|
devices.
|
1999-07-29 22:20:02 +04:00
|
|
|
In a similar way, the window system will open the mouse multiplexor
|
2001-09-12 02:52:52 +04:00
|
|
|
and receive all mouse events; mice can also be dynamically attached
|
1999-07-29 22:20:02 +04:00
|
|
|
and detached.
|
|
|
|
.Pp
|
2001-10-13 21:15:33 +04:00
|
|
|
If a
|
2017-06-13 09:37:21 +03:00
|
|
|
.Xr wskbd 4 ,
|
2017-06-13 11:10:52 +03:00
|
|
|
.Xr wsbell 4 ,
|
2001-10-13 21:15:33 +04:00
|
|
|
or
|
|
|
|
.Xr wsmouse 4
|
|
|
|
device is opened despite having a mux it will be detached from the mux.
|
|
|
|
.Pp
|
1999-07-29 22:20:02 +04:00
|
|
|
It is also possible to inject events into a multiplexor from a
|
2001-04-04 18:16:07 +04:00
|
|
|
user program.
|
|
|
|
.\" This is used by the
|
|
|
|
.\" .Xr moused 8
|
|
|
|
.\" daemon to take data from a mouse connected to a serial port and
|
|
|
|
.\" make it appear on the standard mouse mux.
|
1999-07-29 22:20:02 +04:00
|
|
|
.Sh FILES
|
2001-10-30 01:51:33 +03:00
|
|
|
For each mux device,
|
2019-08-13 13:31:19 +03:00
|
|
|
.Pa /dev/wsmux Ns Ar N
|
2001-10-30 01:51:33 +03:00
|
|
|
there is a control device
|
2019-08-13 13:31:19 +03:00
|
|
|
.Pa /dev/wsmuxctl Ns Ar N .
|
2001-10-30 01:51:33 +03:00
|
|
|
The control device has a minor number 128 greater than the regular
|
2011-03-06 20:39:05 +03:00
|
|
|
mux device.
|
|
|
|
It can be used to control the mux even when it is open,
|
2001-10-30 01:51:33 +03:00
|
|
|
e.g., by
|
|
|
|
.Xr wsmuxctl 8 .
|
2019-08-13 13:31:19 +03:00
|
|
|
.Pp
|
|
|
|
.Bl -tag -width ".Pa /dev/wsmouse" -compact
|
|
|
|
.It Pa /dev/wsmouse
|
2001-10-30 01:51:33 +03:00
|
|
|
a.k.a.
|
|
|
|
.Pa /dev/wsmux0
|
2019-08-13 13:31:19 +03:00
|
|
|
.It Pa /dev/wskbd
|
2001-10-30 01:51:33 +03:00
|
|
|
a.k.a.
|
|
|
|
.Pa /dev/wsmux1
|
2019-08-13 13:31:19 +03:00
|
|
|
.It Pa /usr/include/dev/wscons/wsconsio.h
|
1999-07-29 22:20:02 +04:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2017-06-13 09:37:21 +03:00
|
|
|
.Xr wsbell 4 ,
|
1999-07-29 22:20:02 +04:00
|
|
|
.Xr wscons 4 ,
|
|
|
|
.Xr wsdisplay 4 ,
|
|
|
|
.Xr wskbd 4 ,
|
|
|
|
.Xr wsmouse 4 ,
|
2001-10-30 01:51:33 +03:00
|
|
|
.Xr moused 8 ,
|
1999-07-29 22:20:02 +04:00
|
|
|
.Xr wsconscfg 8 ,
|
|
|
|
.Xr wsconsctl 8 ,
|
2002-10-26 01:00:45 +04:00
|
|
|
.Xr wsmoused 8 ,
|
2001-10-14 00:21:48 +04:00
|
|
|
.Xr wsmuxctl 8
|
2019-08-13 10:09:49 +03:00
|
|
|
.Sh CAVEATS
|
2019-08-13 13:31:19 +03:00
|
|
|
If more than one type of keyboard is used,
|
|
|
|
.Dv WSKBDIO_GTYPE
|
|
|
|
will return the type of the first keyboard.
|