1.\" $OpenBSD: wsmoused.8,v 1.22 2018/04/25 06:29:28 jmc Exp $ 2.\" 3.\" Copyright (c) 2001 Jean-Baptiste Marchand 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.\" 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR 17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd $Mdocdate: April 25 2018 $ 28.Dt WSMOUSED 8 29.Os 30.Sh NAME 31.Nm wsmoused 32.Nd wsmouse daemon 33.Sh SYNOPSIS 34.Nm wsmoused 35.Op Fl 2dfi 36.Op Fl C Ar thresh 37.Op Fl D Ar device 38.Oo 39.Fl M 40.Ar N Ns = Ns Ar M 41.Oc 42.Op Fl p Ar device 43.Op Fl t Ar type 44.Sh DESCRIPTION 45.Nm 46listens for mouse events on the specified 47.Ar device 48and communicates them to the 49.Xr wscons 4 50driver. 51Its purpose is to provide copy/paste functionality on the console. 52It does not happily coexist with the X Window System though, 53so it has to be killed before starting the X Window System. 54.Pp 55By default, the left mouse button is used to select text 56(in the familiar click-and-drag fashion); 57the right button is used to extend the selection; 58and the middle button pastes. 59This behavior can be modified through the use of 60.Fl M , 61e.g.\& 62.Li -M 2=3 63maps the right mouse button to paste. 64.Pp 65The options are as follows: 66.Bl -tag -width "-p device" 67.It Fl 2 68Indicate that the mouse has two buttons. 69In that case, the right button pastes. 70.It Fl C Ar thresh 71Set double click speed as the maximum interval in msec between button clicks. 72If omitted, the default value of 500 msec will be assumed. 73This option will have effect only on the cut and paste operations 74in the text mode console. 75.It Fl D Ar device 76Use 77.Ar device 78as the display control device. 79If omitted, 80.Nm 81will use the default value of 82.Pa /dev/ttyCcfg , 83which controls the 84.Nm wsdisplay0 85display terminals. 86.It Fl d 87Enable debugging messages. 88.It Fl f 89Do not become a daemon and instead run as a foreground process. 90Useful for testing and debugging. 91.It Fl i 92Print the type and the protocol of the mouse and exit. 93.It Fl M Ar N Ns = Ns Ar M 94Assign the physical button 95.Ar M 96to the logical button 97.Ar N . 98You may specify as many instances of this option as you like. 99More than one 100physical button may be assigned to a logical button at the same time. 101In this case the logical button will be down, if either of the assigned 102physical buttons is held down. 103Do not put space around 104.Ql = . 105Button numbers start from one, assigned to the leftmost button. 106.It Fl p Ar device 107Use 108.Ar device 109to communicate with the mouse. 110If this option is not present, the device opened is 111.Pa /dev/wsmouse 112(the multiplexer device that receives all mouse events from all wsmouse 113compatible mice on the system). 114For a serial mouse, you have to explicitly specify the serial port, i.e.\& 115.Ar device 116must be one of 117.Pa /dev/cua0[0-3] . 118.It Fl t Ar type 119This option only applies to serial mice. 120It specifies the protocol used by the serial mice. 121You may explicitly specify a type listed below or use 122.Em auto 123to let 124.Nm 125automatically select an appropriate protocol for the given mouse, if the 126serial mouse respects the PnP COM specification. 127.Pp 128If this option is not specified, 129.Em auto 130is assumed. 131Under normal circumstances, you need to use this option only if 132the mouse is not PnP compatible. 133.Pp 134Valid protocol types for this option are the following: 135.Bl -tag -width thinkingmouse 136.It Ar microsoft 137Microsoft serial mouse protocol. 138Most 2-button serial mice use this protocol. 139.It Ar intellimouse 140Microsoft IntelliMouse protocol. 141Genius NetMouse, ASCII Mie Mouse, Logitech MouseMan+, and FirstMouse+ 142use this protocol as well. 143Other mice with a roller/wheel may be compatible with this protocol. 144.It Ar mousesystems 145MouseSystems 5-byte protocol. 1463-button mice may use this protocol. 147.It Ar mmseries 148MM Series mouse protocol. 149.It Ar logitech 150Logitech mouse protocol. 151Note that this is for old Logitech models. 152.Ar mouseman 153or 154.Ar intellimouse 155should be specified for newer models. 156.It Ar mouseman 157Logitech MouseMan and TrackMan protocol. 158Some 3-button mice may be compatible with this protocol. 159Note that MouseMan+ and FirstMouse+ use 160.Ar intellimouse 161protocol rather than this one. 162.It Ar glidepoint 163ALPS GlidePoint protocol. 164.It Ar thinkingmouse 165Kensington ThinkingMouse protocol. 166.It Ar mmhitab 167Hitachi tablet protocol. 168.El 169.El 170.Sh EXAMPLES 171To start wsmoused on the 172.Nm wsdisplay1 173display terminals, using a two-button serial mouse connected to 174.Pa /dev/cua0 : 175.Pp 176.Dl # wsmoused -2 -D /dev/ttyDcfg -p /dev/cua0 177.Pp 178To start wsmoused on the 179.Nm wsdisplay0 180display terminals, using 181.Pa /dev/wsmouse 182with the left and right buttons swapped 183.Pq assuming a three button mouse : 184.Pp 185.Dl # wsmoused -M 1=3 -M 3=1 186.Sh SEE ALSO 187.Xr wscons 4 , 188.Xr wsmouse 4 189.Sh HISTORY 190The 191.Nm 192daemon is a slightly modified version of the moused daemon from the 193.Fx 194project, written by 195.An Michael Smith Aq Mt msmith@FreeBSD.org . 196Both inherit code from the XFree Project. 197