The mouse is a pointing device that is used to move a pointer (or cursor) around on a computer screen. It allows the user to select and move graphical objects or blocks of text, and to activate on-screen controls. Over the four decades or so since its invention, the mouse has taken many forms and has utilised a broad range of technologies. The basic idea is that, as the mouse is moved around on a flat surface by the user, its movements in two dimensions (i.e. backwards and forwards, left and right) are encoded and sent to the computer. As a result, the computer is able to track the relative speed and direction of the mouse and can adjust the x and y screen coordinates of the mouse pointer accordingly. The mouse is also equipped with one or more buttons. When a mouse button is pressed (or clicked) by the user, it sends an encoded signal to the computer that will trigger the execution of the appropriate command. The action that occurs in response to a mouse click is often (though not always) dependent upon the location of the pointer (or cursor) when the button is clicked.
The original mouse prototype, from which many of today's mice are descended, was developed by Douglas Engelbart and Bill English at the Stanford Research Institute in 1963. They allegedly named their pointing device "mouse" because of its general shape and size, and because the thin cable that connected it to the computer looked somewhat like a tail. The prototype device had two wheels mounted on its lower surface at right angles to each other so that one would turn as the device was moved backwards and forwards, while the other would turn as the device was turned from side to side. If the device was moved along a diagonal path, both wheels would turn (albeit more slowly) at the same time. The wheels were attached to analogue potentiometers which were used to measure the speed of rotation of each wheel and hence the degree of movement along the x and y axes. Mice first caught the public eye in 1984, when Apple released the first Macintosh computer which was equipped with a single button mouse. The adoption of the mouse gained further impetus when Microsoft released its first GUI-based desktop environment (Windows 1.0) in 1985.
Egelbart's original two-wheeled mouse
The original Macintosh computer with its one-button mouse
An early two-button IBM PS/2 mouse circa 1987
Bill English developed a modified version of the mouse in 1972 while working for Xerox PARC. His new design essentially became a template for most of the devices that followed, right up until the late 1990s. In this new configuration, a single rubber-coated steel ball replaces the wheeled arrangement, allowing rotation in any direction on a two-dimensional plane. The ball is in constant contact with two spindles mounted at right-angles to each other inside the body of the mouse. These spindles rotate at different rates (or not at all) depending on the speed and direction in which the ball is rolling at any given time. Each spindle has a slotted wheel mounted on it which sits between a light emitting diode (LED) and a photo detector. As each slot passes between the LED on one side of the wheel and the photo detector on the other side, light from the LED reaches the photo detector. This causes the photo detector to briefly generate a small current. The pattern of current flow is interpreted by the computer to determine the speed and direction of the mouse at a particular moment. This information is then used to adjust the x and y coordinates of the pointer (or cursor) on the screen. In the mid-1980s a microcontroller was added to the mouse, giving it a degree of intelligence by allowing both mouse clicks and the pulses generated by the movement sensors to be interpreted and encoded into discrete packets of binary data.
A typical arrangement of LEDs and sensors inside a ball mouse
The data compiled by the mouse's on-board microcontroller is sent asynchronously to the I/O controller hub in the computer (this is usually the Southbridge chip on the motherboard). The connection between the mouse and the computer is normally a cable that connects to a serial, PS/2 or USB port on the computer, but it may also be a wireless connection. In the case of the touchpad on a laptop or netbook computer, an internal connection is used. For serial or PS/2 connections, the signals reach the Southbridge via the Super I/O chip which incorporates mouse and keyboard control logic. For USB connections, the signals go to a USB host controller built into the Southbridge. Depending on what type of connection is used, control logic on the Super I/O chip or the USB host controller generates an interrupt each time a data packet is received from the mouse. The data is transferred to one of the CPU?s registers, and the CPU calls the relevant interrupt handler (usually part of the operating system software unless specific mouse driver software has been loaded). Mouse movement data will usually move the mouse pointer (or cursor) on the screen, while the interpretation of mouse clicks will be dependent on the currently active program and the position of the cursor when the click occurs.
USB mice usually come with an adapter that allows them to be connected to a PS/2 port. The microcontroller on the mouse should be able to detect which type of port is being used, and will automatically use the appropriate data communications protocol for that type of port. The mouse also obtains its power supply via the cable connection from the computer. Wireless mice usually communicate with the computer either via a USB dongle that has a built-in wireless transceiver (transmitter-receiver), or via a transceiver built into the computer. Although infrared communication has been used for this purpose, it requires a clear line-of-sight between the mouse and the computer's base unit. It is far more common to find Bluetooth (high frequency, short range radio) devices in use which do not have this requirement. Although wireless mice are very convenient to use, they have the disadvantage that they must be powered by batteries.
The optical mouse
One problem with the conventional ball mouse is that it relies on a degree of friction between the ball and the work surface on which the mouse is to be used. This is necessary to ensure that the ball rotates evenly as the user moves the mouse around, allowing movement to be detected consistently along both the x and y axes. Since most conventional work surfaces do not provide sufficient friction for this purpose, it is often necessary to place a rubberised mouse mat beneath the mouse. The ball also has a tendency to collect dirt and debris as it rolls over the mouse mat, which is transferred onto the spindles inside the mouse. This accumulation of dirt tends to reduce the friction between the ball and the spindles, making the mouse's behaviour erratic or causing it to become unresponsive.
The ball tends to transfer dirt inside the mouse
The first optical mouse was developed in 1981 by Richard Lyon at Xerox PARC, but required a special pad covered in equally-spaced dots to allow movement to be tracked. An optical mouse sensor that did not require a special pad did not materialise until the late 1990s. Today however, thanks to falling prices and greatly improved technology, the optical mouse has largely superseded the ball mouse. The optical mouse overcomes the problem of dirt accumulating inside the mouse and interfering with its operation, since it does not rely on mechanical components for tracking mouse movements. Instead, a light-emitting diode (LED) or laser diode is used to send a beam of infra-red or laser light onto the surface beneath the mouse. The amount of reflected light varies over time as the mouse moves across the surface.
A photo-detector converts the patterns of reflected light into analogue signals, which are then converted into digital signals by an analogue-to-digital converter (ADC). The digital signals represent can be interpreted by a digital signal processor (DSP). The changing pattern of reflected light can thus used to determine the speed and direction of movement of the mouse. Since the detection of movement does not rely on friction, a special mouse mat is not normally required (although highly polished or reflective surfaces can cause problems for optical mice). Optical mice also tend to have a higher resolution than ball mice (put another way, they are more sensitive to small movements). Laser-based devices tend to provide higher resolution than LED-based devices, but are usually more expensive. The resolution of the mouse represents the number of pixels per inch that the optical sensor can detect as the mouse moves over a surface, but is normally expressed in terms of dots per inch (dpi). The resolution of a typical optical mouse is somewhere between 400 and 800 dpi.
A typical optical mouse
A true three-dimensional mouse has six degrees of freedom. In other words, it registers motion along three perpendicular axes (forwards or backwards, left or right, up or down), as well as rotation about three perpendicular axes (usually referred to as pitch, yaw and roll). The designs that have emerged for three-dimensional mice over the years have been many and various, and have used a number of technologies to detect 3D motion including ultrasound and gyroscopic sensors. Three-dimensional mice tend to be expensive because of the sophisticated hardware and software required. They are generally only used in fairly specialised computing environments (I used a Logitech "SpaceMouse" many years ago with a desktop virtual reality application - one of its descendants is pictured below), and seldom encountered by the average computer user. These three-dimensional devices are often used alongside conventional mice on the same computer, although a separate device driver is usually required.
Logitech's SpaceExplorer 3D navigational mouse
The most widely used mouse configuration at the time of writing (and since about the mid-1990s) is the three-button scroll mouse. As the description suggests, this type of mouse has a left and right button and a central scroll wheel that also functions as the third button. Although the functionality of each button can vary within different software packages and operating environments, certain conventions have become established. The left button, for example, is almost universally used to select objects or activate on-screen controls. A single left mouse click will usually select (and often highlight) an object, while a double-click (two clicks in quick succession) is normally used to activate a control. Examples include single-clicking on an open application window or dialog box to give it the focus, or double-clicking on a program icon on the desktop to start a program. The left mouse button can also be used to drag objects around on the screen (for example to move a highlighted section of text from one place in a word processor document to another). This is accomplished by moving the mouse over the object to be moved, and holding down the left mouse button while "dragging" the object to its new location. If the move is accepted by the software, releasing the mouse button will leave the object highlighted and in its new position.
An IBM three-button scroll mouse
The right-hand mouse button is frequently used to invoke a context-sensitive menu. The menu that will appear depends upon the current application and on which object is directly under the mouse pointer when the user executes the right-click. The function of the middle button tends to be more application-dependent than the other two buttons. In many cases, clicking the middle mouse button once will put the application into a state where forward and backward movement of the mouse can be used to scroll up or down through a document. Clicking the middle mouse button again, or clicking one of the other two buttons once, will cause the application to revert to its previous state. The scroll wheel, as its name suggests, also allows the user to scroll up or down through a document by rotating the wheel forwards or backwards. A variation of the scroll wheel is sometimes encountered in which the scroll wheel tilts from side to side, allowing the user to scroll horizontally (from left to right or vice versa) as well as up or down. This could be useful when navigating a document such as a spreadsheet, which can often be too wide to fit onto a single screen. Many operating systems and applications allow the user to configure the behaviour of the mouse, including the actions associated with each of the buttons (a feature often utilised by computer gaming enthusiasts).
Mouse configuration can often be customised