1.\" $NetBSD: wsmux.4,v 1.10 2002/10/25 21:00:45 wiz Exp $ 2.\" 3.\" Copyright (c) 1999 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the NetBSD 17.\" Foundation, Inc. and its contributors. 18.\" 4. Neither the name of The NetBSD Foundation nor the names of its 19.\" contributors may be used to endorse or promote products derived 20.\" from this software without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 23.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 24.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 25.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 26.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32.\" POSSIBILITY OF SUCH DAMAGE. 33.\" 34.Dd July 26, 1999 35.Dt WSMUX 4 36.Os 37.Sh NAME 38.Nm wsmux 39.Nd console keyboard/mouse multiplexor for wscons 40.Sh SYNOPSIS 41.Cd "wskbd* at ... mux 1" 42.Cd "wsmouse* at ... mux 0" 43.Pp 44.Cd pseudo-device wsmux 45.Sh DESCRIPTION 46The 47.Nm 48is a pseudo-device driver that allows several 49.Xr wscons 4 50input devices to have their events multiplexed into one stream. 51.Pp 52The typical usage for this device is to have two multiplexors, one 53for mouse events and one for keyboard events. All 54.Xr wsmouse 4 55devices should direct their events to the mouse mux (normally 0) 56and all keyboard devices, except the console, should direct their 57events to the keyboard mux (normally 1). A device will 58send its events to the mux indicated by the 59.Va mux 60locator. If none is given the device will not use a multiplexor. 61The keyboard multiplexor should be connected to the display, using 62the 63.Xr wsconscfg 8 64command. It will then receive all keystrokes from all keyboards 65and, furthermore, keyboards can be dynamically attached and detached without 66further user interaction. 67In a similar way, the window system will open the mouse multiplexor 68and receive all mouse events; mice can also be dynamically attached 69and detached. 70.Pp 71If a 72.Xr wskbd 4 73or 74.Xr wsmouse 4 75device is opened despite having a mux it will be detached from the mux. 76.Pp 77It is also possible to inject events into a multiplexor from a 78user program. 79.\" This is used by the 80.\" .Xr moused 8 81.\" daemon to take data from a mouse connected to a serial port and 82.\" make it appear on the standard mouse mux. 83.Sh FILES 84For each mux device, 85.Pa /dev/wsmuxN 86there is a control device 87.Pa /dev/wsmuxctlN . 88The control device has a minor number 128 greater than the regular 89mux device. It can be used to control the mux even when it is open, 90e.g., by 91.Xr wsmuxctl 8 . 92.Bl -item 93.It 94.Pa /dev/wsmouse 95a.k.a. 96.Pa /dev/wsmux0 97.It 98.Pa /dev/wskbd 99a.k.a. 100.Pa /dev/wsmux1 101.It 102.Pa /usr/include/dev/wscons/wsconsio.h 103.El 104.Sh SEE ALSO 105.Xr wscons 4 , 106.Xr wsdisplay 4 , 107.Xr wskbd 4 , 108.Xr wsmouse 4 , 109.Xr moused 8 , 110.Xr wsconscfg 8 , 111.Xr wsconsctl 8 , 112.Xr wsfontload 8 , 113.Xr wsmoused 8 , 114.Xr wsmuxctl 8 115