This preview shows page 1. Sign up to view the full content.
Unformatted text preview: reports the movement and button click events in a sequential stream as they
happen. These are coded as multibyte records. The first byte is the event type, and the
following bytes are the particulars of the event (the change in the vertical and horizontal
position of the mouse for mouse movement events, which button and the type of click for
mouse click events). However, like a keyboard, a mouse also uses an interrupt
mechanism to report the mouse operations to the computer system. That is, it does not
directly send a message to the program that is currently executing.. Rather, it stores the
sequential stream of events in a special memory buffer and sends an interrupt request to
the CPU. The currently executing program regularly checks to see whether a mouse event has occurred. On sensing an interrupt signal, »the program reads the sequential stream of
events from the special memory buffer and then reacts appropriately.
Mouse devices are of many types and there are many ways to categorize them. Some of
the commonly used ways to categorize mouse devices are discussed below.
1. Mechanical and Optical Mouse. A mechanical mouse has a ball inside it that partially
projects out through an opening in its base. The ball rolls due to surface friction when the
mouse is moved on a flat surface. On two sides of the ball at a 90-degree angle from each
other are two small wheels that spin to match the speed of the ball. Each wheel of the
mouse is connected to a sensor. As the mouse ball rolls when the mouse is moved, the
sensors detect how much each wheel spins and send this informationjo the computer in
the form of changes to the current position of the graphics cursor on the screen.
An optical mouse has no mechanical parts like the ball and wheels. Instead it has a builtin photo-detector. Such a mouse comes with a special pad with gridlines printed on it. For
moving the graphics cursor on the screen, the mouse has to be moved on the special pad.
The photo-detector senses each horizontal and vertical line on the pad as the mouse
moves on it, then it sends this information to the computer in the form of cha...
View Full Document
This document was uploaded on 04/07/2014.
- Spring '14