From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,ca259b2a45e16701,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1994-02-22 20:11:27 PST Path: gmd.de!xlink.net!howland.reston.ans.net!gatech!news-feed-2.peachnet.edu!concert!bigblue.oit.unc.edu!bounce-bounce From: mike@starbug.apana.org.au (Mike Battersby) Newsgroups: comp.os.linux.announce Subject: Microsoft Busmouse Mini-HOWTO Followup-To: comp.os.linux.misc Date: 23 Feb 1994 04:11:27 GMT Organization: Starbug Linux Message-ID: <2kel1f$pdg@bigblue.oit.unc.edu> Reply-To: mike@starbug.apana.org.au (Mike Battersby) NNTP-Posting-Host: calypso.oit.unc.edu Keywords: microsoft busmouse mouse Originator: mdw@sunSITE [This may become a real HOWTO in the near future! --mdw] The Microsoft Busmouse mini-HOWTO v0.2, 20 Feb 94 by Mike Battersby INDEX 0. Introduction 0.1 Disclaimer 0.2 Where to find help 0.3 Feedback 1. Getting things going 1.1 How do I know if I have a Microsoft busmouse? 1.2 Setting the mouse interrupt. 1.3 Compiling the kernel 1.4 /dev/mouse 1.5 Testing your mouse 1.6 Using selection 1.7 Using Xfree86 ------------------------------------------------------------------------------ 0. Introduction This document is a guide to getting your Microsoft busmouse working with Linux. I've written this in the hope that the ten people a week who post "how do I get my busmouse to work" questions in comp.os.linux.announce will read it first, though I won't be holding my breath. Busmouse support has been in the kernel for as long as I can remember, and hasn't changed in a long time (at least as of now, 0.99.15), so this document should work with any version of Linux you're likely to have. In the near future this document will likely be merged into a full busmouse howto. 0.1 Disclaimer The information in this document is correct to the best of my knowledge, but there's a always a chance I've made some mistakes, so don't follow everything too blindly, especially if it seems wrong. Nothing here should have a detrimental effect on your computer, but just in case I take no responsibility for any damages incurred from the use of the information contained herein. Microsoft(R) is a Trademark of Microsoft Corporation. 0.2 Where to find help If you've pored over this document hundreds of times and still can't get your mouse to work, feel free to contact me any time at and I'll see if I can help you out. 0.3 Feedback If you find any mistakes in this document, have any comments about its contents or an update or addition, send them to me at the address listed in section 0.2. ------------------------------------------------------------------------------ 1. Getting things going 1.1 How do I know if I have a Microsoft busmouse? Microsoft mice are relatively easy to recognize. They are two button mice with the left button bigger than the right, a rounded "ergonomic" shape that I have been told looks like a bar of "dove" soap (at least to Americans :-), and in most cases the word "Microsoft" written on the top. If you follow the mouse cord to the back of the machine and it ends in a small round detachable plug, about 9mm in diameter, with 9 pins and a notch in one side, its a good bet you've got a Microsoft busmouse. (Note: I have heard that there are new teardrop shaped Microsoft busmice. If anyone has one of these beasties, please get in touch with me.) 1.2 Setting the mouse interrupt First things, you'll need to know which interrupt number your mouse is using, and make sure it doesn't conflict with any other peripherals you have installed. If you open up your computers case and look at the card which your mouse plugs into, you should notice a block of jumpers near the bottom middle of the card labeled "INTERRUPT" with positions for interrupt (otherwise known as IRQ) numbers 2,3,4 and 5. You should make sure that your mouse is not trying to use the same interrupt as any of your other devices, and change the interrupt by moving the jumper to an unused interrupt setting if it does. *************************************************** *** MAKE SURE YOUR COMPUTER IS TURNED OFF *** *** BEFORE CHANGING THE JUMPERS AROUND. *** *************************************************** In most cases IRQ4 is used for the first serial port (/dev/ttyS0), IRQ3 for the second (/dev/ttyS1), and IRQ5 for some SCSI adaptors. Check the documentation for all your peripherals to see which interrupt they use. In my experience, IRQ2 seems to cause the least hassle in most cases. 1.3 Compiling the kernel In order for your Microsoft busmouse to operate correctly you will need to recompile your kernel with the busmouse support compiled in. Change to your kernel directory (here assumed to be '/usr/src/linux') and do a make config and answer 'y' to the Microsoft busmouse support (CONFIG_MS_BUSMOUSE) [n] question. Next, edit the file '/usr/src/linux/include/linux/busmouse.h', and change the line which says #define MOUSE_IRQ 5 to reflect the interrupt number for your mouse (see section 1.3 for details on finding your interrupt number). Due to the vagaries of the PC architecture, if you have set your mouse to use interrupt 2, you must set the #define to use interrupt 9. Examples For a mouse on interrupt 3, you should change the line to read #define MOUSE_IRQ 3 For a mouse on interrupt 2, you should change the line to read #define MOUSE_IRQ 9 Next, compile your kernel as per the instructions which come with it, and boot from the new kernel. You should now have the busmouse support correctly compiled in. 1.4 /dev/mouse The Microsoft busmouse device is accessed through the /dev/bmousems device (on some machines you may have a /dev/importbm instead - if so, simply substitute that for bmousems for the rest of this section), major 10 minor 2. If you don't have such a device, you can make one by changing to the /dev directory and executing the following command as 'root'. mknod /dev/bmousems c 10 2 You should then make a symbolic link from this device to /dev/mouse, and use that to refer to the mouse from then on. The link can be made with the following command (again as 'root') ln -fs /dev/bmousems /dev/mouse 1.5 Testing your mouse Get the file 'selection-1.5.tar.gz' from your local Linux ftp site and compile the program 'test-mouse' within it, according to the instructions (all you should need to do is type 'make test-mouse'). Run the program like this test-mouse -t bm If your mouse is working correctly, you should be able to paint on the screen by holding down the right or left mouse button and dragging the mouse. Push both mouse buttons together to exit the program. 1.6 Using selection Selection is a program which allows you to do mouse based 'cut- and-paste' between virtual console under Linux. Selection can be found as the file 'selection-1.5.tar.gz' at your friendly Linux FTP site (such as sunsite.unc.edu), and contains instructions for getting it compiled. Once compiled, selection should be run like this: selection -t bm & You should then be able to cut and paste text between virtual consoles using the mouse buttons. Read the documentation with selection, or do a 'man selection' for more information on how to operate it. 1.7 Using Xfree86 To use your Microsoft busmouse under Xfree86, your Xconfig file should contain the following lines which pertain to mouse support. You should comment out any other mouse related lines. Busmouse "/dev/mouse" Emulate3Buttons To emulate the use of the middle mouse button on three button mice, press both mouse buttons simultaneously.