Re: [AD] Mouse wheels

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


>On Wed, 4 Aug 1999 22:34:40 +0300, Pavlos wrote:
>
>>I have a wheel mouse (MS IntelliMouse PS/2). AFAIK, the wheel is
recognized
>> as buttons 3(click),4(up) and 5(down) or vice versa. I don't have enough
>>info to
>>try to do this but If someone decides to do it, I can help test it.
>
>Correct on clicking being mouse button three, but as far as the wheel
moving goes, it's considered a third axis, the "Z"
>axis. (As if you were pushing your mouse into your desk or something.
Hehe). But as far as I know, there's no way you
>can do it in DOS, unless MS has added a new feature in the latest
95/98/Intellipoint drivers for the DOS boxes.
>Otherwise, you can't do it unless you write your own based off Linux or
XFree86 drivers, and I sure don't have time for
>that. :)
>
>John Harger


Hmm, you're right about the 'Z' axis but the wheel button is also reported
as a third button.
Here's some info I found some months ago...

2.3 IntelliMouse Default PS/2 Data Packet
When in the default mode IntelliMouse sends its mouse data in a Microsoft
standard PS/2 3-byte data packet. When in this mode pressing the wheel
button or turning the wheel will have no effect.

  D7 D6 D5 D4 D3 D2 D1 D0
Byte 1 0 0 Y7 X7 1 0 Right
Button Left
Button
Byte 2 X7 X6 X5 X4 X3 X2 X1 X0
Byte 3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

2.4 IntelliMouse Extended PS/2 Data Packet
When IntelliMouse pointing devices are in the extended mode they send their
mouse data in a 4-byte data packet. The packet is the normal Microsoft
standard PS/2 3-byte packet plus one additional byte containing the wheel
data denoted as Z below. Also, the wheel button is reported in D2 of Byte 1
(the third button.)

  D7 D6 D5 D4 D3 D2 D1 D0
Byte 1 0 0 Y7 X7 1 Wheel
Button Right
Button Left
Button
Byte 2 X7 X6 X5 X4 X3 X2 X1 X0
Byte 3 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
Byte 4 Z7 Z6 Z5 Z4 Z3 Z2 Z1 Z0





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/