Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!boulder!sunybcs!bingvaxu!leah!uwmcsd1!bbn!rochester!cornell!uw-beaver!uw-june!uw-entropy!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.sys.ibm.pc Subject: Re: Serial Mouse Data Format Message-ID: <1564@dataio.Data-IO.COM> Date: 10 Jun 88 14:47:02 GMT References: <1988Jun5.120653.7373@gpu.utcs.toronto.edu> Reply-To: bright@dataio.Data-IO.COM (Walter Bright) Organization: Data I/O Corporation; Redmond, WA Lines: 23 In article <1988Jun5.120653.7373@gpu.utcs.toronto.edu> lharris@gpu.utcs.toronto.edu (Leonard Harris) writes: >Does anyone know the details of the format of serial data coming >from a serial mouse such as the Microsoft mouse. The Microsoft serial mouse sends 3 byte sequences as follows: Bit 6 5 4 3 2 1 0 ----------------------------------------------------------- Byte 1 1 L R Y7 Y6 X7 X6 Byte 2 0 X5 X4 X3 X2 X1 X0 Byte 3 0 Y5 Y4 Y3 Y2 Y1 Y0 The L and R are the mouse button states, 1 means down. The X and Y values are signed, and represent the number of mickeys travelled. The 1 in bit 6 is so you can recognize the start of the sequence. One interesting side effect is that there is no room for a bit for a middle button (3 button mice use a different format). This info is gleaned from the Logitech tech manual. I have the Microsoft Mouse programmer's manual, but there is no mention of this in it. There is also no information about the differences between the bus mouse and the serial mouse. I was rather annoyed at this after spending the extra bucks for the technical manual.