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$ 32.\" 33.Dd November 12, 2004 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 VH Op Fl U Ar distance 47.Op Fl A Ar exp Ns Op , Ns Ar offset 48.Op Fl a Ar X Ns Op , Ns Ar Y 49.Op Fl C Ar threshold 50.Op Fl m Ar N=M 51.Op Fl w Ar N 52.Op Fl z Ar target 53.Op Fl t Ar mousetype 54.Op Fl l Ar level 55.Op Fl 3 Op Fl E Ar timeout 56.Op Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after 57.Fl p Ar port 58.Pp 59.Nm 60.Op Fl Pd 61.Fl p Ar port 62.Fl i Ar info 63.Sh DESCRIPTION 64The 65.Nm 66utility and the console driver work together to support 67mouse operation in the text console and user programs. 68They virtualize the mouse and provide user programs with mouse data 69in the standard format 70(see 71.Xr sysmouse 4 ) . 72.Pp 73The mouse daemon listens to the specified port for mouse data, 74interprets and then passes it via ioctls to the console driver. 75The mouse daemon 76reports translation movement, button press/release 77events and movement of the roller or the wheel if available. 78The roller/wheel movement is reported as 79.Dq Z 80axis movement. 81.Pp 82The console driver will display the mouse pointer on the screen 83and provide cut and paste functions if the mouse pointer is enabled 84in the virtual console via 85.Xr vidcontrol 1 . 86If 87.Xr sysmouse 4 88is opened by the user program, the console driver also passes the mouse 89data to the device so that the user program will see it. 90.Pp 91If the mouse daemon receives the signal 92.Dv SIGHUP , 93it will reopen the mouse port and reinitialize itself. 94Useful if 95the mouse is attached/detached while the system is suspended. 96.Pp 97If the mouse daemon receives the signal 98.Dv SIGUSR1 , 99it will stop passing mouse events. 100Sending the signal 101.Dv SIGUSR1 102again will resume passing mouse events. 103Useful if your typing on a laptop is 104interrupted by accidentally touching the mouse pad. 105.Pp 106The following options are available: 107.Bl -tag -width indent 108.It Fl 3 109Emulate the third (middle) button for 2-button mice. 110It is emulated 111by pressing the left and right physical buttons simultaneously. 112.It Fl C Ar threshold 113Set double click speed as the maximum interval in msec between button clicks. 114Without this option, the default value of 500 msec will be assumed. 115This option will have effect only on the cut and paste operations 116in the text mode console. 117The user program which is reading mouse data 118via 119.Xr sysmouse 4 120will not be affected. 121.It Fl D 122Lower DTR on the serial port. 123This option is valid only if 124.Ar mousesystems 125is selected as the protocol type. 126The DTR line may need to be dropped for a 3-button mouse 127to operate in the 128.Ar mousesystems 129mode. 130.It Fl E Ar timeout 131When the third button emulation is enabled 132(see above), 133the 134.Nm 135utility waits 136.Ar timeout 137msec at most before deciding whether two buttons are being pressed 138simultaneously. 139The default timeout is 100 msec. 140.It Fl F Ar rate 141Set the report rate (reports/sec) of the device if supported. 142.It Fl H 143Enable 144.Dq Horizontal Virtual Scrolling . 145With this option set, holding the middle mouse 146button down will cause motion to be interpreted as 147horizontal scrolling. 148Use the 149.Fl U 150option to set the distance the mouse must move before the scrolling mode is 151activated. 152This option may be used with or without the 153.Fl V 154option. 155.It Fl I Ar file 156Write the process id of the 157.Nm 158utility in the specified file. 159Without this option, the process id will be stored in 160.Pa /var/run/moused.pid . 161.It Fl P 162Do not start the Plug and Play COM device enumeration procedure 163when identifying the serial mouse. 164If this option is given together with the 165.Fl i 166option, the 167.Nm 168utility will not be able to print useful information for the serial mouse. 169.It Fl R 170Lower RTS on the serial port. 171This option is valid only if 172.Ar mousesystems 173is selected as the protocol type by the 174.Fl t 175option below. 176It is often used with the 177.Fl D 178option above. 179Both RTS and DTR lines may need to be dropped for 180a 3-button mouse to operate in the 181.Ar mousesystems 182mode. 183.It Fl S Ar baudrate 184Select the baudrate for the serial port (1200 to 9600). 185Not all serial mice support this option. 186.It Fl T Ar distance Ns Op , Ns Ar time Ns Op , Ns Ar after 187Terminate drift. 188Use this option if mouse pointer slowly wanders when mouse is not moved. 189Movements up to 190.Ar distance 191(for example 4) pixels (X+Y) in 192.Ar time 193msec (default 500) are ignored, except during 194.Ar after 195msec (default 4000) since last real mouse movement. 196.It Fl V 197Enable 198.Dq Virtual Scrolling . 199With this option set, holding the middle mouse 200button down will cause motion to be interpreted as scrolling. 201Use the 202.Fl U 203option to set the distance the mouse must move before the scrolling mode is 204activated. 205.It Fl U Ar distance 206When 207.Dq Virtual Scrolling 208is enabled, the 209.Fl U 210option can be used to set the 211.Ar distance 212(in pixels) that the mouse must move before the scrolling 213mode is activated. 214The default 215.Ar distance 216is 3 pixels. 217.It Fl A Ar exp Ns Op , Ns Ar offset 218Apply exponential (dynamic) acceleration to mouse movements: 219the faster you move the mouse, the more it will be accelerated. 220That means that small mouse movements are not accelerated, 221so they are still very accurate, while a faster movement will 222drive the pointer quickly across the screen. 223.Pp 224The 225.Ar exp 226value specifies the exponent, which is basically 227the amount of acceleration. Useful values are in the 228range 1.1 to 2.0, but it depends on your mouse hardware 229and your personal preference. A value of 1.0 means no 230exponential acceleration. A value of 2.0 means squared 231acceleration (i.e. if you move the mouse twice as fast, 232the pointer will move four times as fast on the screen). 233Values beyond 2.0 are possible but not recommended. 234A good value to start is probably 1.5. 235.Pp 236The optional 237.Ar offset 238value specifies the distance at which the acceleration 239begins. The default is 1.0, which means that the 240acceleration is applied to movements larger than one unit. 241If you specify a larger value, it takes more speed for 242the acceleration to kick in, i.e. the speed range for 243small and accurate movements is wider. 244Usually the default should be sufficient, but if you're 245not satisfied with the behaviour, try a value of 2.0. 246.Pp 247Note that the 248.Fl A 249option interacts badly with the X server's own acceleration, 250which doesn't work very well anyway. Therefore it is 251recommended to switch it off if necessary: 252.Dq xset m 1 . 253.It Fl a Ar X Ns Op , Ns Ar Y 254Accelerate or decelerate the mouse input. 255This is a linear acceleration only. 256Values less than 1.0 slow down movement, values greater than 1.0 speed it 257up. 258Specifying only one value sets the acceleration for both axes. 259.Pp 260You can use the 261.Fl a 262and 263.Fl A 264options at the same time to have the combined effect 265of linear and exponential acceleration. 266.It Fl c 267Some mice report middle button down events 268as if the left and right buttons are being pressed. 269This option handles this. 270.It Fl d 271Enable debugging messages. 272.It Fl f 273Do not become a daemon and instead run as a foreground process. 274Useful for testing and debugging. 275.It Fl i Ar info 276Print specified information and quit. 277Available pieces of 278information are: 279.Pp 280.Bl -tag -compact -width modelxxx 281.It Ar port 282Port (device file) name, i.e.\& 283.Pa /dev/cuad0 , 284.Pa /dev/mse0 285and 286.Pa /dev/psm0 . 287.It Ar if 288Interface type: serial, bus, inport or ps/2. 289.It Ar type 290Protocol type. 291It is one of the types listed under the 292.Fl t 293option below or 294.Ar sysmouse 295if the driver supports the 296.Ar sysmouse 297data format standard. 298.It Ar model 299Mouse model. 300The 301.Nm 302utility may not always be able to identify the model. 303.It Ar all 304All of the above items. 305Print port, interface, type and model in this order 306in one line. 307.El 308.Pp 309If the 310.Nm 311utility cannot determine the requested information, it prints 312.Dq Li unknown 313or 314.Dq Li generic . 315.It Fl l Ar level 316Specifies at which level 317.Nm 318should operate the mouse driver. 319Refer to 320.Sx Operation Levels 321in 322.Xr psm 4 323for more information on this. 324.It Fl m Ar N=M 325Assign the physical button 326.Ar M 327to the logical button 328.Ar N . 329You may specify as many instances of this option as you like. 330More than one physical button may be assigned to a logical button at the 331same time. 332In this case the logical button will be down, 333if either of the assigned physical buttons is held down. 334Do not put space around 335.Ql = . 336.It Fl p Ar port 337Use 338.Ar port 339to communicate with the mouse. 340.It Fl r Ar resolution 341Set the resolution of the device; in Dots Per Inch, or 342.Ar low , 343.Ar medium-low , 344.Ar medium-high 345or 346.Ar high . 347This option may not be supported by all the device. 348.It Fl s 349Select a baudrate of 9600 for the serial line. 350Not all serial mice support this option. 351.It Fl t Ar type 352Specify the protocol type of the mouse attached to the port. 353You may explicitly specify a type listed below, or use 354.Ar auto 355to let the 356.Nm 357utility automatically select an appropriate protocol for the given 358mouse. 359If you entirely omit this option in the command line, 360.Fl t Ar auto 361is assumed. 362Under normal circumstances, 363you need to use this option only if the 364.Nm 365utility is not able to detect the protocol automatically 366(see 367.Sx "Configuring Mouse Daemon" ) . 368.Pp 369Note that if a protocol type is specified with this option, the 370.Fl P 371option above is implied and Plug and Play COM device enumeration 372procedure will be disabled. 373.Pp 374Also note that if your mouse is attached to the PS/2 mouse port, you should 375always choose 376.Ar auto 377or 378.Ar ps/2 , 379regardless of the brand and model of the mouse. 380Likewise, if your 381mouse is attached to the bus mouse port, choose 382.Ar auto 383or 384.Ar busmouse . 385Serial mouse protocols will not work with these mice. 386.Pp 387For the USB mouse, the protocol must be 388.Ar auto . 389No other protocol will work with the USB mouse. 390.Pp 391Valid types for this option are 392listed below. 393.Pp 394For the serial mouse: 395.Bl -tag -compact -width mousesystemsxxx 396.It Ar microsoft 397Microsoft serial mouse protocol. 398Most 2-button serial mice use this protocol. 399.It Ar intellimouse 400Microsoft IntelliMouse protocol. 401Genius NetMouse, 402.Tn ASCII 403Mie Mouse, 404Logitech MouseMan+ and FirstMouse+ use this protocol too. 405Other mice with a roller/wheel may be compatible with this protocol. 406.It Ar mousesystems 407MouseSystems 5-byte protocol. 4083-button mice may use this protocol. 409.It Ar mmseries 410MM Series mouse protocol. 411.It Ar logitech 412Logitech mouse protocol. 413Note that this is for old Logitech models. 414.Ar mouseman 415or 416.Ar intellimouse 417should be specified for newer models. 418.It Ar mouseman 419Logitech MouseMan and TrackMan protocol. 420Some 3-button mice may be compatible 421with this protocol. 422Note that MouseMan+ and FirstMouse+ use 423.Ar intellimouse 424protocol rather than this one. 425.It Ar glidepoint 426ALPS GlidePoint protocol. 427.It Ar thinkingmouse 428Kensington ThinkingMouse protocol. 429.It Ar mmhitab 430Hitachi tablet protocol. 431.It Ar x10mouseremote 432X10 MouseRemote. 433.It Ar kidspad 434Genius Kidspad and Easypad protocol. 435.It Ar versapad 436Interlink VersaPad protocol. 437.El 438.It Ar gtco_digipad 439GTCO Digipad protocol. 440.Pp 441For the bus and InPort mouse: 442.Bl -tag -compact -width mousesystemsxxx 443.It Ar busmouse 444This is the only protocol type available for 445the bus and InPort mouse and should be specified for any bus mice 446and InPort mice, regardless of the brand. 447.El 448.Pp 449For the PS/2 mouse: 450.Bl -tag -compact -width mousesystemsxxx 451.It Ar ps/2 452This is the only protocol type available for the PS/2 mouse 453and should be specified for any PS/2 mice, regardless of the brand. 454.El 455.Pp 456For the USB mouse, 457.Ar auto 458is the only protocol type available for the USB mouse 459and should be specified for any USB mice, regardless of the brand. 460.It Fl w Ar N 461Make the physical button 462.Ar N 463act as the wheel mode button. 464While this button is pressed, X and Y axis movement is reported to be zero 465and the Y axis movement is mapped to Z axis. 466You may further map the Z axis movement to virtual buttons by the 467.Fl z 468option below. 469.It Fl z Ar target 470Map Z axis (roller/wheel) movement to another axis or to virtual buttons. 471Valid 472.Ar target 473maybe: 474.Bl -tag -compact -width x__ 475.It Ar x 476.It Ar y 477X or Y axis movement will be reported when the Z axis movement is detected. 478.It Ar N 479Report down events for the virtual buttons 480.Ar N 481and 482.Ar N+1 483respectively when negative and positive Z axis movement 484is detected. 485There do not need to be physical buttons 486.Ar N 487and 488.Ar N+1 . 489Note that mapping to logical buttons is carried out after mapping 490from the Z axis movement to the virtual buttons is done. 491.It Ar N1 N2 492Report down events for the virtual buttons 493.Ar N1 494and 495.Ar N2 496respectively when negative and positive Z axis movement 497is detected. 498.It Ar N1 N2 N3 N4 499This is useful for the mouse with two wheels of which 500the second wheel is used to generate horizontal scroll action, 501and for the mouse which has a knob or a stick which can detect 502the horizontal force applied by the user. 503.Pp 504The motion of the second wheel will be mapped to the buttons 505.Ar N3 , 506for the negative direction, and 507.Ar N4 , 508for the positive direction. 509If the buttons 510.Ar N3 511and 512.Ar N4 513actually exist in this mouse, their actions will not be detected. 514.Pp 515Note that horizontal movement or second roller/wheel movement may not 516always be detected, 517because there appears to be no accepted standard as to how it is encoded. 518.Pp 519Note also that some mice think left is the negative horizontal direction; 520others may think otherwise. 521Moreover, there are some mice whose two wheels are both mounted vertically, 522and the direction of the second vertical wheel does not match the 523first one. 524.El 525.El 526.Ss Configuring Mouse Daemon 527The first thing you need to know is the interface type 528of the mouse you are going to use. 529It can be determined by looking at the connector of the mouse. 530The serial mouse has a D-Sub female 9- or 25-pin connector. 531The bus and InPort mice have either a D-Sub male 9-pin connector 532or a round DIN 9-pin connector. 533The PS/2 mouse is equipped with a small, round DIN 6-pin connector. 534Some mice come with adapters with which the connector can 535be converted to another. 536If you are to use such an adapter, 537remember the connector at the very end of the mouse/adapter pair is 538what matters. 539The USB mouse has a flat rectangular connector. 540.Pp 541The next thing to decide is a port to use for the given interface. 542For the bus, InPort and PS/2 mice, there is little choice: 543the bus and InPort mice always use 544.Pa /dev/mse0 , 545and the PS/2 mouse is always at 546.Pa /dev/psm0 . 547There may be more than one serial port to which the serial 548mouse can be attached. 549Many people often assign the first, built-in 550serial port 551.Pa /dev/cuad0 552to the mouse. 553You can attach multiple USB mice to your system or to your USB hub. 554They are accessible as 555.Pa /dev/ums0 , /dev/ums1 , 556and so on. 557.Pp 558You may want to create a symbolic link 559.Pa /dev/mouse 560pointing to the real port to which the mouse is connected, so that you 561can easily distinguish which is your 562.Dq mouse 563port later. 564.Pp 565The next step is to guess the appropriate protocol type for the mouse. 566The 567.Nm 568utility may be able to automatically determine the protocol type. 569Run the 570.Nm 571utility with the 572.Fl i 573option and see what it says. 574If the command can identify 575the protocol type, no further investigation is necessary on your part. 576You may start the daemon without explicitly specifying a protocol type 577(see 578.Sx EXAMPLES ) . 579.Pp 580The command may print 581.Ar sysmouse 582if the mouse driver supports this protocol type. 583.Pp 584Note that the 585.Dv type 586and 587.Dv model 588printed by the 589.Fl i 590option do not necessarily match the product name of the pointing device 591in question, but they may give the name of the device with which it is 592compatible. 593.Pp 594If the 595.Fl i 596option yields nothing, you need to specify a protocol type to the 597.Nm 598utility by the 599.Fl t 600option. 601You have to make a guess and try. 602There is rule of thumb: 603.Pp 604.Bl -enum -compact -width 1.X 605.It 606The bus and InPort mice always use 607.Ar busmouse 608protocol regardless of the brand of the mouse. 609.It 610The 611.Ar ps/2 612protocol should always be specified for the PS/2 mouse 613regardless of the brand of the mouse. 614.It 615You must specify the 616.Ar auto 617protocol for the USB mouse. 618.It 619Most 2-button serial mice support the 620.Ar microsoft 621protocol. 622.It 6233-button serial mice may work with the 624.Ar mousesystems 625protocol. 626If it does not, it may work with the 627.Ar microsoft 628protocol although 629the third (middle) button will not function. 6303-button serial mice may also work with the 631.Ar mouseman 632protocol under which the third button may function as expected. 633.It 6343-button serial mice may have a small switch to choose between 635.Dq MS 636and 637.Dq PC , 638or 639.Dq 2 640and 641.Dq 3 . 642.Dq MS 643or 644.Dq 2 645usually mean the 646.Ar microsoft 647protocol. 648.Dq PC 649or 650.Dq 3 651will choose the 652.Ar mousesystems 653protocol. 654.It 655If the mouse has a roller or a wheel, it may be compatible with the 656.Ar intellimouse 657protocol. 658.El 659.Pp 660To test if the selected protocol type is correct for the given mouse, 661enable the mouse pointer in the current virtual console, 662.Pp 663.Dl "vidcontrol -m on" 664.Pp 665start the mouse daemon in the foreground mode, 666.Pp 667.Dl "moused -f -p <selected_port> -t <selected_protocol>" 668.Pp 669and see if the mouse pointer travels correctly 670according to the mouse movement. 671Then try cut & paste features by 672clicking the left, right and middle buttons. 673Type ^C to stop 674the command. 675.Ss Multiple Mice 676As many instances of the mouse daemon as the number of mice attached to 677the system may be run simultaneously; one 678instance for each mouse. 679This is useful if the user wants to use the built-in PS/2 pointing device 680of a laptop computer while on the road, but wants to use a serial 681mouse when s/he attaches the system to the docking station in the office. 682Run two mouse daemons and tell the application program 683(such as the 684.Tn "X\ Window System" ) 685to use 686.Xr sysmouse 4 , 687then the application program will always see mouse data from either mouse. 688When the serial mouse is not attached, the corresponding mouse daemon 689will not detect any movement or button state change and the application 690program will only see mouse data coming from the daemon for the 691PS/2 mouse. 692In contrast when both mice are attached and both of them 693are moved at the same time in this configuration, 694the mouse pointer will travel across the screen just as if movement of 695the mice is combined all together. 696.Sh FILES 697.Bl -tag -width /dev/consolectl -compact 698.It Pa /dev/consolectl 699device to control the console 700.It Pa /dev/mse%d 701bus and InPort mouse driver 702.It Pa /dev/psm%d 703PS/2 mouse driver 704.It Pa /dev/sysmouse 705virtualized mouse driver 706.It Pa /dev/ttyv%d 707virtual consoles 708.It Pa /dev/ums%d 709USB mouse driver 710.It Pa /var/run/moused.pid 711process id of the currently running 712.Nm 713utility 714.It Pa /var/run/MouseRemote 715UNIX-domain stream socket for X10 MouseRemote events 716.El 717.Sh EXAMPLES 718.Dl "moused -p /dev/cuad0 -i type" 719.Pp 720Let the 721.Nm 722utility determine the protocol type of the mouse at the serial port 723.Pa /dev/cuad0 . 724If successful, the command will print the type, otherwise it will say 725.Dq Li unknown . 726.Bd -literal -offset indent 727moused -p /dev/cuad0 728vidcontrol -m on 729.Ed 730.Pp 731If the 732.Nm 733utility is able to identify the protocol type of the mouse at the specified 734port automatically, you can start the daemon without the 735.Fl t 736option and enable the mouse pointer in the text console as above. 737.Bd -literal -offset indent 738moused -p /dev/mouse -t microsoft 739vidcontrol -m on 740.Ed 741.Pp 742Start the mouse daemon on the serial port 743.Pa /dev/mouse . 744The protocol type 745.Ar microsoft 746is explicitly specified by the 747.Fl t 748option. 749.Pp 750.Dl "moused -p /dev/mouse -m 1=3 -m 3=1" 751.Pp 752Assign the physical button 3 (right button) to the logical button 1 753(logical left) and the physical button 1 (left) to the logical 754button 3 (logical right). 755This will effectively swap the left and right buttons. 756.Pp 757.Dl "moused -p /dev/mouse -t intellimouse -z 4" 758.Pp 759Report negative Z axis movement (i.e., mouse wheel) as the button 4 pressed 760and positive Z axis movement (i.e., mouse wheel) as the button 5 pressed. 761.Pp 762If you add 763.Pp 764.Dl "ALL ALL = NOPASSWD: /usr/bin/killall -USR1 moused" 765.Pp 766to your 767.Pa /usr/local/etc/sudoers 768file, and bind 769.Pp 770.Dl "killall -USR1 moused" 771.Pp 772to a key in your window manager, you can suspend mouse events on your laptop if 773you keep brushing over the mouse pad while typing. 774.Sh CAVEATS 775Many pad devices behave as if the first (left) button were pressed if 776the user 777.Dq taps 778the surface of the pad. 779In contrast, some ALPS GlidePoint and Interlink VersaPad models 780treat the tapping action 781as fourth button events. 782Use the option 783.Dq Fl m Li 1=4 784for these models 785to obtain the same effect as the other pad devices. 786.Pp 787Cut and paste functions in the virtual console assume that there 788are three buttons on the mouse. 789The logical button 1 (logical left) selects a region of text in the 790console and copies it to the cut buffer. 791The logical button 3 (logical right) extends the selected region. 792The logical button 2 (logical middle) pastes the selected text 793at the text cursor position. 794If the mouse has only two buttons, the middle, `paste' button 795is not available. 796To obtain the paste function, use the 797.Fl 3 798option to emulate the middle button, or use the 799.Fl m 800option to assign the physical right button to the logical middle button: 801.Dq Fl m Li 2=3 . 802.Sh SEE ALSO 803.Xr kill 1 , 804.Xr vidcontrol 1 , 805.Xr xset 1 , 806.Xr keyboard 4 , 807.Xr mse 4 , 808.Xr psm 4 , 809.Xr screen 4 , 810.Xr sysmouse 4 , 811.Xr ums 4 812.Sh STANDARDS 813The 814.Nm 815utility partially supports 816.Dq Plug and Play External COM Device Specification 817in order to support PnP serial mice. 818However, due to various degrees of conformance to the specification by 819existing serial mice, it does not strictly follow the version 1.0 of the 820standard. 821Even with this less strict approach, 822it may not always determine an appropriate protocol type 823for the given serial mouse. 824.Sh HISTORY 825The 826.Nm 827utility first appeared in 828.Fx 2.2 . 829.Sh AUTHORS 830.An -nosplit 831The 832.Nm 833utility was written by 834.An Michael Smith Aq msmith@FreeBSD.org . 835This manual page was written by 836.An Mike Pritchard Aq mpp@FreeBSD.org . 837The command and manual page have since been updated by 838.An Kazutaka Yokota Aq yokota@FreeBSD.org . 839