| 1 | .\" Copyright (c) 1996 |
| 2 | .\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved. |
| 3 | .\" |
| 4 | .\" Redistribution and use in source and binary forms, with or without |
| 5 | .\" modification, are permitted provided that the following conditions |
| 6 | .\" are met: |
| 7 | .\" 1. Redistributions of source code must retain the above copyright |
| 8 | .\" notice, this list of conditions and the following disclaimer. |
| 9 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 10 | .\" notice, this list of conditions and the following disclaimer in the |
| 11 | .\" documentation and/or other materials provided with the distribution. |
| 12 | .\" 3. All advertising materials mentioning features or use of this software |
| 13 | .\" must display the following acknowledgement: |
| 14 | .\" This product includes software developed by Mike Pritchard. |
| 15 | .\" 4. Neither the name of the author nor the names of its contributors |
| 16 | .\" may be used to endorse or promote products derived from this software |
| 17 | .\" without specific prior written permission. |
| 18 | .\" |
| 19 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
| 20 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 21 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 22 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| 23 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 24 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 25 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 26 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 27 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 29 | .\" SUCH DAMAGE. |
| 30 | .\" |
| 31 | .\" $FreeBSD: src/usr.sbin/moused/moused.8,v 1.47 2004/10/11 07:57:08 philip Exp $ |
| 32 | .\" |
| 33 | .Dd February 8, 2008 |
| 34 | .Dt MOUSED 8 |
| 35 | .Os |
| 36 | .Sh NAME |
| 37 | .Nm moused |
| 38 | .Nd pass mouse data to the console driver |
| 39 | .Sh SYNOPSIS |
| 40 | .Nm |
| 41 | .Op Fl DPRacdfs |
| 42 | .Op Fl I Ar file |
| 43 | .Op Fl F Ar rate |
| 44 | .Op Fl r Ar resolution |
| 45 | .Op Fl S Ar baudrate |
| 46 | .Op Fl V Op Fl U Ar distance |
| 47 | .Op Fl a Ar X Ns Op , Ns Ar Y |
| 48 | .Op Fl C Ar threshold |
| 49 | .Op Fl m Ar N=M |
| 50 | .Op Fl w Ar N |
| 51 | .Op Fl z Ar target |
| 52 | .Op Fl t Ar mousetype |
| 53 | .Op Fl l Ar level |
| 54 | .Op Fl 3 Op Fl E Ar timeout |
| 55 | .Fl p Ar port |
| 56 | .Pp |
| 57 | .Nm |
| 58 | .Op Fl Pd |
| 59 | .Fl p Ar port |
| 60 | .Fl i Ar info |
| 61 | .Sh DESCRIPTION |
| 62 | The |
| 63 | .Nm |
| 64 | utility and the console driver work together to support |
| 65 | mouse operation in the text console and user programs. |
| 66 | They virtualize the mouse and provide user programs with mouse data |
| 67 | in the standard format |
| 68 | (see |
| 69 | .Xr sysmouse 4 ) . |
| 70 | .Pp |
| 71 | The mouse daemon listens to the specified port for mouse data, |
| 72 | interprets and then passes it via ioctls to the console driver. |
| 73 | The mouse daemon |
| 74 | reports translation movement, button press/release |
| 75 | events and movement of the roller or the wheel if available. |
| 76 | The roller/wheel movement is reported as ``Z'' axis movement. |
| 77 | .Pp |
| 78 | The console driver will display the mouse pointer on the screen |
| 79 | and provide cut and paste functions if the mouse pointer is enabled |
| 80 | in the virtual console via |
| 81 | .Xr vidcontrol 1 . |
| 82 | If |
| 83 | .Xr sysmouse 4 |
| 84 | is opened by the user program, the console driver also passes the mouse |
| 85 | data to the device so that the user program will see it. |
| 86 | .Pp |
| 87 | If the mouse daemon receives the signal |
| 88 | .Dv SIGHUP , |
| 89 | it will reopen the mouse port and reinitialize itself. |
| 90 | Useful if |
| 91 | the mouse is attached/detached while the system is suspended. |
| 92 | .Pp |
| 93 | The following options are available: |
| 94 | .Bl -tag -width indent |
| 95 | .It Fl 3 |
| 96 | Emulate the third (middle) button for 2-button mice. |
| 97 | It is emulated |
| 98 | by pressing the left and right physical buttons simultaneously. |
| 99 | .It Fl C Ar threshold |
| 100 | Set double click speed as the maximum interval in msec between button clicks. |
| 101 | Without this option, the default value of 500 msec will be assumed. |
| 102 | This option will have effect only on the cut and paste operations |
| 103 | in the text mode console. |
| 104 | The user program which is reading mouse data |
| 105 | via |
| 106 | .Xr sysmouse 4 |
| 107 | will not be affected. |
| 108 | .It Fl D |
| 109 | Lower DTR on the serial port. |
| 110 | This option is valid only if |
| 111 | .Ar mousesystems |
| 112 | is selected as the protocol type. |
| 113 | The DTR line may need to be dropped for a 3-button mouse |
| 114 | to operate in the |
| 115 | .Ar mousesystems |
| 116 | mode. |
| 117 | .It Fl E Ar timeout |
| 118 | When the third button emulation is enabled |
| 119 | (see above), |
| 120 | the |
| 121 | .Nm |
| 122 | utility waits |
| 123 | .Ar timeout |
| 124 | msec at most before deciding whether two buttons are being pressed |
| 125 | simultaneously. |
| 126 | The default timeout is 100 msec. |
| 127 | .It Fl F Ar rate |
| 128 | Set the report rate (reports/sec) of the device if supported. |
| 129 | .It Fl I Ar file |
| 130 | Write the process id of the |
| 131 | .Nm |
| 132 | utility in the specified file. |
| 133 | Without this option, the process id will be stored in |
| 134 | .Pa /var/run/moused.pid . |
| 135 | .It Fl P |
| 136 | Do not start the Plug and Play COM device enumeration procedure |
| 137 | when identifying the serial mouse. |
| 138 | If this option is given together with the |
| 139 | .Fl i |
| 140 | option, the |
| 141 | .Nm |
| 142 | utility will not be able to print useful information for the serial mouse. |
| 143 | .It Fl R |
| 144 | Lower RTS on the serial port. |
| 145 | This option is valid only if |
| 146 | .Ar mousesystems |
| 147 | is selected as the protocol type by the |
| 148 | .Fl t |
| 149 | option below. |
| 150 | It is often used with the |
| 151 | .Fl D |
| 152 | option above. |
| 153 | Both RTS and DTR lines may need to be dropped for |
| 154 | a 3-button mouse to operate in the |
| 155 | .Ar mousesystems |
| 156 | mode. |
| 157 | .It Fl S Ar baudrate |
| 158 | Select the baudrate for the serial port (1200 to 9600). |
| 159 | Not all serial mice support this option. |
| 160 | .It Fl V |
| 161 | Enable |
| 162 | .Dq Virtual Scrolling . |
| 163 | With this option set, holding the middle mouse |
| 164 | button down will cause motion to be interpreted as scrolling. Use the |
| 165 | .Fl U |
| 166 | option to set the distance the mouse must move before the scrolling mode is |
| 167 | activated. |
| 168 | .It Fl a Ar X Ns Op , Ns Ar Y |
| 169 | Accelerate or decelerate the mouse input. |
| 170 | This is a linear acceleration only. |
| 171 | Values less than 1.0 slow down movement, values greater than 1.0 speed it |
| 172 | up. |
| 173 | Specifying only one value sets the acceleration for both axes. |
| 174 | .It Fl c |
| 175 | Some mice report middle button down events |
| 176 | as if the left and right buttons are being pressed. |
| 177 | This option handles this. |
| 178 | .It Fl d |
| 179 | Enable debugging messages. |
| 180 | .It Fl f |
| 181 | Do not become a daemon and instead run as a foreground process. |
| 182 | Useful for testing and debugging. |
| 183 | .It Fl i Ar info |
| 184 | Print specified information and quit. |
| 185 | Available pieces of |
| 186 | information are: |
| 187 | .Pp |
| 188 | .Bl -tag -compact -width modelxxx |
| 189 | .It Ar port |
| 190 | Port (device file) name, i.e.\& |
| 191 | .Pa /dev/cuaa0 |
| 192 | and |
| 193 | .Pa /dev/psm0 . |
| 194 | .It Ar if |
| 195 | Interface type: serial, bus, inport or ps/2. |
| 196 | .It Ar type |
| 197 | Protocol type. |
| 198 | It is one of the types listed under the |
| 199 | .Fl t |
| 200 | option below or |
| 201 | .Ar sysmouse |
| 202 | if the driver supports the |
| 203 | .Ar sysmouse |
| 204 | data format standard. |
| 205 | .It Ar model |
| 206 | Mouse model. |
| 207 | The |
| 208 | .Nm |
| 209 | utility may not always be able to identify the model. |
| 210 | .It Ar all |
| 211 | All of the above items. |
| 212 | Print port, interface, type and model in this order |
| 213 | in one line. |
| 214 | .El |
| 215 | .Pp |
| 216 | If the |
| 217 | .Nm |
| 218 | utility cannot determine the requested information, it prints ``unknown'' |
| 219 | or ``generic''. |
| 220 | .It Fl l Ar level |
| 221 | Specifies at which level |
| 222 | .Nm |
| 223 | should operate the mouse driver. |
| 224 | Refer to |
| 225 | .Em Operation Levels |
| 226 | in |
| 227 | .Xr psm 4 |
| 228 | for more information on this. |
| 229 | .It Fl m Ar N=M |
| 230 | Assign the physical button |
| 231 | .Ar M |
| 232 | to the logical button |
| 233 | .Ar N . |
| 234 | You may specify as many instances of this option as you like. |
| 235 | More than one physical button may be assigned to a logical button at the |
| 236 | same time. |
| 237 | In this case the logical button will be down, |
| 238 | if either of the assigned physical buttons is held down. |
| 239 | Do not put space around `='. |
| 240 | .It Fl p Ar port |
| 241 | Use |
| 242 | .Ar port |
| 243 | to communicate with the mouse. |
| 244 | .It Fl r Ar resolution |
| 245 | Set the resolution of the device; in Dots Per Inch, or |
| 246 | .Ar low , |
| 247 | .Ar medium-low , |
| 248 | .Ar medium-high |
| 249 | or |
| 250 | .Ar high . |
| 251 | This option may not be supported by all the device. |
| 252 | .It Fl s |
| 253 | Select a baudrate of 9600 for the serial line. |
| 254 | Not all serial mice support this option. |
| 255 | .It Fl t Ar type |
| 256 | Specify the protocol type of the mouse attached to the port. |
| 257 | You may explicitly specify a type listed below, or use |
| 258 | .Ar auto |
| 259 | to let the |
| 260 | .Nm |
| 261 | utility automatically select an appropriate protocol for the given |
| 262 | mouse. |
| 263 | If you entirely omit this option in the command line, |
| 264 | .Fl t Ar auto |
| 265 | is assumed. |
| 266 | Under normal circumstances, |
| 267 | you need to use this option only if the |
| 268 | .Nm |
| 269 | utility is not able to detect the protocol automatically |
| 270 | (see |
| 271 | .Sx "Configuring Mouse Daemon" ) . |
| 272 | .Pp |
| 273 | Note that if a protocol type is specified with this option, the |
| 274 | .Fl P |
| 275 | option above is implied and Plug and Play COM device enumeration |
| 276 | procedure will be disabled. |
| 277 | .Pp |
| 278 | Also note that if your mouse is attached to the PS/2 mouse port, you should |
| 279 | always choose |
| 280 | .Ar auto |
| 281 | or |
| 282 | .Ar ps/2 , |
| 283 | regardless of the brand and model of the mouse. |
| 284 | Likewise, if your |
| 285 | mouse is attached to the bus mouse port, choose |
| 286 | .Ar auto |
| 287 | or |
| 288 | .Ar busmouse . |
| 289 | Serial mouse protocols will not work with these mice. |
| 290 | .Pp |
| 291 | For the USB mouse, the protocol must be |
| 292 | .Ar auto . |
| 293 | No other protocol will work with the USB mouse. |
| 294 | .Pp |
| 295 | Valid types for this option are |
| 296 | listed below. |
| 297 | .Pp |
| 298 | For the serial mouse: |
| 299 | .Bl -tag -compact -width mousesystemsxxx |
| 300 | .It Ar microsoft |
| 301 | Microsoft serial mouse protocol. |
| 302 | Most 2-button serial mice use this protocol. |
| 303 | .It Ar intellimouse |
| 304 | Microsoft IntelliMouse protocol. |
| 305 | Genius NetMouse, |
| 306 | .Tn ASCII |
| 307 | Mie Mouse, |
| 308 | Logitech MouseMan+ and FirstMouse+ use this protocol too. |
| 309 | Other mice with a roller/wheel may be compatible with this protocol. |
| 310 | .It Ar mousesystems |
| 311 | MouseSystems 5-byte protocol. |
| 312 | 3-button mice may use this protocol. |
| 313 | .It Ar mmseries |
| 314 | MM Series mouse protocol. |
| 315 | .It Ar logitech |
| 316 | Logitech mouse protocol. |
| 317 | Note that this is for old Logitech models. |
| 318 | .Ar mouseman |
| 319 | or |
| 320 | .Ar intellimouse |
| 321 | should be specified for newer models. |
| 322 | .It Ar mouseman |
| 323 | Logitech MouseMan and TrackMan protocol. |
| 324 | Some 3-button mice may be compatible |
| 325 | with this protocol. |
| 326 | Note that MouseMan+ and FirstMouse+ use |
| 327 | .Ar intellimouse |
| 328 | protocol rather than this one. |
| 329 | .It Ar glidepoint |
| 330 | ALPS GlidePoint protocol. |
| 331 | .It Ar thinkingmouse |
| 332 | Kensington ThinkingMouse protocol. |
| 333 | .It Ar mmhitab |
| 334 | Hitachi tablet protocol. |
| 335 | .It Ar x10mouseremote |
| 336 | X10 MouseRemote. |
| 337 | .It Ar kidspad |
| 338 | Genius Kidspad and Easypad protocol. |
| 339 | .It Ar versapad |
| 340 | Interlink VersaPad protocol. |
| 341 | .El |
| 342 | .Pp |
| 343 | For the bus and InPort mouse: |
| 344 | .Bl -tag -compact -width mousesystemsxxx |
| 345 | .It Ar busmouse |
| 346 | This is the only protocol type available for |
| 347 | the bus and InPort mouse and should be specified for any bus mice |
| 348 | and InPort mice, regardless of the brand. |
| 349 | .El |
| 350 | .Pp |
| 351 | For the PS/2 mouse: |
| 352 | .Bl -tag -compact -width mousesystemsxxx |
| 353 | .It Ar ps/2 |
| 354 | This is the only protocol type available for the PS/2 mouse |
| 355 | and should be specified for any PS/2 mice, regardless of the brand. |
| 356 | .El |
| 357 | .Pp |
| 358 | For the USB mouse, |
| 359 | .Ar auto |
| 360 | is the only protocol type available for the USB mouse |
| 361 | and should be specified for any USB mice, regardless of the brand. |
| 362 | .It Fl w Ar N |
| 363 | Make the physical button |
| 364 | .Ar N |
| 365 | act as the wheel mode button. |
| 366 | While this button is pressed, X and Y axis movement is reported to be zero |
| 367 | and the Y axis movement is mapped to Z axis. |
| 368 | You may further map the Z axis movement to virtual buttons by the |
| 369 | .Fl z |
| 370 | option below. |
| 371 | .It Fl z Ar target |
| 372 | Map Z axis (roller/wheel) movement to another axis or to virtual buttons. |
| 373 | Valid |
| 374 | .Ar target |
| 375 | maybe: |
| 376 | .Bl -tag -compact -width x__ |
| 377 | .It Ar x |
| 378 | .It Ar y |
| 379 | X or Y axis movement will be reported when the Z axis movement is detected. |
| 380 | .It Ar N |
| 381 | Report down events for the virtual buttons |
| 382 | .Ar N |
| 383 | and |
| 384 | .Ar N+1 |
| 385 | respectively when negative and positive Z axis movement |
| 386 | is detected. |
| 387 | There do not need to be physical buttons |
| 388 | .Ar N |
| 389 | and |
| 390 | .Ar N+1 . |
| 391 | Note that mapping to logical buttons is carried out after mapping |
| 392 | from the Z axis movement to the virtual buttons is done. |
| 393 | .It Ar N1 N2 |
| 394 | Report down events for the virtual buttons |
| 395 | .Ar N1 |
| 396 | and |
| 397 | .Ar N2 |
| 398 | respectively when negative and positive Z axis movement |
| 399 | is detected. |
| 400 | .It Ar N1 N2 N3 N4 |
| 401 | This is useful for the mouse with two wheels of which |
| 402 | the second wheel is used to generate horizontal scroll action, |
| 403 | and for the mouse which has a knob or a stick which can detect |
| 404 | the horizontal force applied by the user. |
| 405 | .Pp |
| 406 | The motion of the second wheel will be mapped to the buttons |
| 407 | .Ar N3 , |
| 408 | for the negative direction, and |
| 409 | .Ar N4 , |
| 410 | for the positive direction. |
| 411 | If the buttons |
| 412 | .Ar N3 |
| 413 | and |
| 414 | .Ar N4 |
| 415 | actually exist in this mouse, their actions will not be detected. |
| 416 | .Pp |
| 417 | Note that horizontal movement or second roller/wheel movement may not |
| 418 | always be detected, |
| 419 | because there appears to be no accepted standard as to how it is encoded. |
| 420 | .Pp |
| 421 | Note also that some mice think left is the negative horizontal direction; |
| 422 | others may think otherwise. |
| 423 | Moreover, there are some mice whose two wheels are both mounted vertically, |
| 424 | and the direction of the second vertical wheel does not match the |
| 425 | first one. |
| 426 | .El |
| 427 | .El |
| 428 | .Ss Configuring Mouse Daemon |
| 429 | The first thing you need to know is the interface type |
| 430 | of the mouse you are going to use. |
| 431 | It can be determined by looking at the connector of the mouse. |
| 432 | The serial mouse has a D-Sub female 9- or 25-pin connector. |
| 433 | The bus and InPort mice have either a D-Sub male 9-pin connector |
| 434 | or a round DIN 9-pin connector. |
| 435 | The PS/2 mouse is equipped with a small, round DIN 6-pin connector. |
| 436 | Some mice come with adapters with which the connector can |
| 437 | be converted to another. |
| 438 | If you are to use such an adapter, |
| 439 | remember the connector at the very end of the mouse/adapter pair is |
| 440 | what matters. |
| 441 | The USB mouse has a flat rectangular connector. |
| 442 | .Pp |
| 443 | The next thing to decide is a port to use for the given interface. |
| 444 | For the PS/2 mouse, there is little choice: |
| 445 | it is always at |
| 446 | .Pa /dev/psm0 . |
| 447 | There may be more than one serial port to which the serial |
| 448 | mouse can be attached. |
| 449 | Many people often assign the first, built-in |
| 450 | serial port |
| 451 | .Pa /dev/cuaa0 |
| 452 | to the mouse. |
| 453 | You can attach multiple USB mice to your system or to your USB hub. |
| 454 | They are accessible as |
| 455 | .Pa /dev/ums0 , /dev/ums1 , |
| 456 | and so on. |
| 457 | .Pp |
| 458 | You may want to create a symbolic link |
| 459 | .Pa /dev/mouse |
| 460 | pointing to the real port to which the mouse is connected, so that you |
| 461 | can easily distinguish which is your ``mouse'' port later. |
| 462 | .Pp |
| 463 | The next step is to guess the appropriate protocol type for the mouse. |
| 464 | The |
| 465 | .Nm |
| 466 | utility may be able to automatically determine the protocol type. |
| 467 | Run the |
| 468 | .Nm |
| 469 | utility with the |
| 470 | .Fl i |
| 471 | option and see what it says. |
| 472 | If the command can identify |
| 473 | the protocol type, no further investigation is necessary on your part. |
| 474 | You may start the daemon without explicitly specifying a protocol type |
| 475 | (see |
| 476 | .Sx EXAMPLES ) . |
| 477 | .Pp |
| 478 | The command may print |
| 479 | .Ar sysmouse |
| 480 | if the mouse driver supports this protocol type. |
| 481 | .Pp |
| 482 | Note that the |
| 483 | .Ar type |
| 484 | and |
| 485 | .Ar model |
| 486 | printed by the |
| 487 | .Fl i |
| 488 | option do not necessarily match the product name of the pointing device |
| 489 | in question, but they may give the name of the device with which it is |
| 490 | compatible. |
| 491 | .Pp |
| 492 | If the |
| 493 | .Fl i |
| 494 | option yields nothing, you need to specify a protocol type to the |
| 495 | .Nm |
| 496 | utility by the |
| 497 | .Fl t |
| 498 | option. |
| 499 | You have to make a guess and try. |
| 500 | There is rule of thumb: |
| 501 | .Pp |
| 502 | .Bl -enum -compact -width 1.X |
| 503 | .It |
| 504 | The bus and InPort mice always use |
| 505 | .Ar busmouse |
| 506 | protocol regardless of the brand of the mouse. |
| 507 | .It |
| 508 | The |
| 509 | .Ar ps/2 |
| 510 | protocol should always be specified for the PS/2 mouse |
| 511 | regardless of the brand of the mouse. |
| 512 | .It |
| 513 | You must specify the |
| 514 | .Ar auto |
| 515 | protocol for the USB mouse. |
| 516 | .It |
| 517 | Most 2-button serial mice support the |
| 518 | .Ar microsoft |
| 519 | protocol. |
| 520 | .It |
| 521 | 3-button serial mice may work with the |
| 522 | .Ar mousesystems |
| 523 | protocol. |
| 524 | If it does not, it may work with the |
| 525 | .Ar microsoft |
| 526 | protocol although |
| 527 | the third (middle) button will not function. |
| 528 | 3-button serial mice may also work with the |
| 529 | .Ar mouseman |
| 530 | protocol under which the third button may function as expected. |
| 531 | .It |
| 532 | 3-button serial mice may have a small switch to choose between ``MS'' |
| 533 | and ``PC'', or ``2'' and ``3''. |
| 534 | ``MS'' or ``2'' usually mean the |
| 535 | .Ar microsoft |
| 536 | protocol. |
| 537 | ``PC'' or ``3'' will choose the |
| 538 | .Ar mousesystems |
| 539 | protocol. |
| 540 | .It |
| 541 | If the mouse has a roller or a wheel, it may be compatible with the |
| 542 | .Ar intellimouse |
| 543 | protocol. |
| 544 | .El |
| 545 | .Pp |
| 546 | To test if the selected protocol type is correct for the given mouse, |
| 547 | enable the mouse pointer in the current virtual console, |
| 548 | .Pp |
| 549 | .Dl vidcontrol -m on |
| 550 | .Pp |
| 551 | start the mouse daemon in the foreground mode, |
| 552 | .Pp |
| 553 | .Dl moused -f -p Ar _selected_port_ -t Ar _selected_protocol_ |
| 554 | .Pp |
| 555 | and see if the mouse pointer travels correctly |
| 556 | according to the mouse movement. |
| 557 | Then try cut & paste features by |
| 558 | clicking the left, right and middle buttons. |
| 559 | Type ^C to stop |
| 560 | the command. |
| 561 | .Ss Multiple Mice |
| 562 | As many instances of the mouse daemon as the number of mice attached to |
| 563 | the system may be run simultaneously; one |
| 564 | instance for each mouse. |
| 565 | This is useful if the user wants to use the built-in PS/2 pointing device |
| 566 | of a laptop computer while on the road, but wants to use a serial |
| 567 | mouse when s/he attaches the system to the docking station in the office. |
| 568 | Run two mouse daemons and tell the application program |
| 569 | (such as the |
| 570 | .Tn "X\ Window System" ) |
| 571 | to use |
| 572 | .Xr sysmouse 4 , |
| 573 | then the application program will always see mouse data from either mouse. |
| 574 | When the serial mouse is not attached, the corresponding mouse daemon |
| 575 | will not detect any movement or button state change and the application |
| 576 | program will only see mouse data coming from the daemon for the |
| 577 | PS/2 mouse. |
| 578 | In contrast when both mice are attached and both of them |
| 579 | are moved at the same time in this configuration, |
| 580 | the mouse pointer will travel across the screen just as if movement of |
| 581 | the mice is combined all together. |
| 582 | .Sh FILES |
| 583 | .Bl -tag -width /dev/consolectl -compact |
| 584 | .It Pa /dev/consolectl |
| 585 | device to control the console |
| 586 | .It Pa /dev/psm%d |
| 587 | PS/2 mouse driver |
| 588 | .It Pa /dev/sysmouse |
| 589 | virtualized mouse driver |
| 590 | .It Pa /dev/ttyv%d |
| 591 | virtual consoles |
| 592 | .It Pa /dev/ums%d |
| 593 | USB mouse driver |
| 594 | .It Pa /var/run/moused.pid |
| 595 | process id of the currently running |
| 596 | .Nm |
| 597 | utility |
| 598 | .It Pa /var/run/MouseRemote |
| 599 | .Ux Ns -domain |
| 600 | stream socket for X10 MouseRemote events |
| 601 | .El |
| 602 | .Sh EXAMPLES |
| 603 | .Dl moused -p /dev/cuaa0 -i type |
| 604 | .Pp |
| 605 | Let the |
| 606 | .Nm |
| 607 | utility determine the protocol type of the mouse at the serial port |
| 608 | .Pa /dev/cuaa0 . |
| 609 | If successful, the command will print the type, otherwise it will say |
| 610 | ``unknown''. |
| 611 | .Pp |
| 612 | .Dl moused -p /dev/cuaa0 |
| 613 | .Dl vidcontrol -m on |
| 614 | .Pp |
| 615 | If the |
| 616 | .Nm |
| 617 | utility is able to identify the protocol type of the mouse at the specified |
| 618 | port automatically, you can start the daemon without the |
| 619 | .Fl t |
| 620 | option and enable the mouse pointer in the text console as above. |
| 621 | .Pp |
| 622 | .Dl moused -p /dev/mouse -t microsoft |
| 623 | .Dl vidcontrol -m on |
| 624 | .Pp |
| 625 | Start the mouse daemon on the serial port |
| 626 | .Pa /dev/mouse . |
| 627 | The protocol type |
| 628 | .Ar microsoft |
| 629 | is explicitly specified by the |
| 630 | .Fl t |
| 631 | option. |
| 632 | .Pp |
| 633 | .Dl moused -p /dev/mouse -m 1=3 -m 3=1 |
| 634 | .Pp |
| 635 | Assign the physical button 3 (right button) to the logical button 1 |
| 636 | (logical left) and the physical button 1 (left) to the logical |
| 637 | button 3 (logical right). |
| 638 | This will effectively swap the left and right buttons. |
| 639 | .Pp |
| 640 | .Dl moused -p /dev/mouse -t intellimouse -z 4 |
| 641 | .Pp |
| 642 | Report negative Z axis movement (i.e., mouse wheel) as the button 4 pressed |
| 643 | and positive Z axis movement (i.e., mouse wheel) as the button 5 pressed. |
| 644 | .Sh CAVEATS |
| 645 | Many pad devices behave as if the first (left) button were pressed if |
| 646 | the user `taps' the surface of the pad. |
| 647 | In contrast, some ALPS GlidePoint and Interlink VersaPad models |
| 648 | treat the tapping action |
| 649 | as fourth button events. |
| 650 | Use the option ``-m 1=4'' for these models |
| 651 | to obtain the same effect as the other pad devices. |
| 652 | .Pp |
| 653 | Cut and paste functions in the virtual console assume that there |
| 654 | are three buttons on the mouse. |
| 655 | The logical button 1 (logical left) selects a region of text in the |
| 656 | console and copies it to the cut buffer. |
| 657 | The logical button 3 (logical right) extends the selected region. |
| 658 | The logical button 2 (logical middle) pastes the selected text |
| 659 | at the text cursor position. |
| 660 | If the mouse has only two buttons, the middle, `paste' button |
| 661 | is not available. |
| 662 | To obtain the paste function, use the |
| 663 | .Fl 3 |
| 664 | option to emulate the middle button, or use the |
| 665 | .Fl m |
| 666 | option to assign the physical right button to the logical middle button: |
| 667 | ``-m 2=3''. |
| 668 | .Sh SEE ALSO |
| 669 | .Xr kill 1 , |
| 670 | .Xr vidcontrol 1 , |
| 671 | .Xr keyboard 4 , |
| 672 | .Xr psm 4 , |
| 673 | .Xr screen 4 , |
| 674 | .Xr sysmouse 4 , |
| 675 | .Xr ums 4 |
| 676 | .Sh STANDARDS |
| 677 | The |
| 678 | .Nm |
| 679 | utility partially supports |
| 680 | .Dq Plug and Play External COM Device Specification |
| 681 | in order to support PnP serial mice. |
| 682 | However, due to various degrees of conformance to the specification by |
| 683 | existing serial mice, it does not strictly follow the version 1.0 of the |
| 684 | standard. |
| 685 | Even with this less strict approach, |
| 686 | it may not always determine an appropriate protocol type |
| 687 | for the given serial mouse. |
| 688 | .Sh HISTORY |
| 689 | The |
| 690 | .Nm |
| 691 | utility first appeared in |
| 692 | .Fx 2.2 . |
| 693 | .Sh AUTHORS |
| 694 | .An -nosplit |
| 695 | The |
| 696 | .Nm |
| 697 | utility was written by |
| 698 | .An Michael Smith Aq msmith@FreeBSD.org . |
| 699 | This manual page was written by |
| 700 | .An Mike Pritchard Aq mpp@FreeBSD.org . |
| 701 | The command and manual page have since been updated by |
| 702 | .An Kazutaka Yokota Aq yokota@FreeBSD.org . |