xref: /openbsd/share/man/man4/wsmux.4 (revision 4bdff4be)
1.\" $OpenBSD: wsmux.4,v 1.15 2022/03/31 17:27:21 naddy Exp $
2.\" $NetBSD: wsmux.4,v 1.2 1999/11/03 22:01:40 castor Exp $
3.\"
4.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26.\" POSSIBILITY OF SUCH DAMAGE.
27.\"
28.Dd $Mdocdate: March 31 2022 $
29.Dt WSMUX 4
30.Os
31.Sh NAME
32.Nm wsmux
33.Nd console keyboard/mouse multiplexor for wscons
34.Sh SYNOPSIS
35.Cd "wskbd*     at ... mux N"
36.Cd "wsmouse*   at ... mux N"
37.Pp
38.Cd "pseudo-device wsmux" Op Ar count
39.Sh DESCRIPTION
40The
41.Nm
42is a pseudo-device driver that allows several
43.Xr wscons 4
44input devices to have their events multiplexed into one stream.
45.Pp
46The typical usage for this device is to have two multiplexors, one
47for mouse events and one for keyboard events.
48All
49.Xr wsmouse 4
50devices should direct their events to the mouse mux (normally 0)
51and all keyboard devices, except the console, should direct their
52events to the keyboard mux (normally 1).
53A device will send its events to the mux indicated by the
54.Va mux
55locator.
56If none is given, the device will not use a multiplexor.
57The keyboard multiplexor should be connected to the display, using
58the
59.Xr wsconscfg 8
60command.
61It will then receive all keystrokes from all keyboards and, furthermore,
62keyboards can be dynamically attached and detached without further
63user interaction.
64In a similar way, the window system will open the mouse multiplexor
65and receive all mouse events; mice can also be dynamically attached
66and detached.
67.Pp
68It is also possible to inject events into a multiplexor from a user program.
69This is used by the
70.Xr wsmoused 8
71daemon to take data from a mouse connected to a serial port and
72make it appear on the standard mouse mux.
73.Sh FILES
74.Bl -item -compact
75.It
76.Pa /dev/wsmouse
77.It
78.Pa /dev/wskbd
79.It
80.Pa /usr/include/dev/wscons/wsconsio.h
81.El
82.Sh SEE ALSO
83.Xr intro 4 ,
84.Xr wscons 4 ,
85.Xr wsdisplay 4 ,
86.Xr wskbd 4 ,
87.Xr wsmouse 4 ,
88.Xr wsconscfg 8 ,
89.Xr wsconsctl 8 ,
90.Xr wsmoused 8
91