wprice@nmsu.edu (William Price) (02/02/90)
Can anyone explain how to poll a Microsoft Mouse, connected to Com1, from inside of Turbo Pascal (version 5.5)? I would like to be able to tell which direction the mouse is moviing, and which button has been clicked if any.
martins@fiddler.SanDiego.NCR.COM (Martin Sandman) (02/06/90)
The mouses sends cursor values of up, down, left, right as extended codes; that is, ReadKey sends a zero and then an H, P, K, R for up, down, left, right. The right mouse button is an escape [char(27)]; the middle button is an enter (char[13]); and the left one sends an F1 and opens a pop-up menu that has F1 thru F10, /, and ?. The F1 - F10 are also two-character extented codes like the arrow keys; after the zero you get 59 thru 68. -- Martin ______________________________________________________________________ = UUCP: sdcsvax!ncr-sd!fiddler!martins Martin D. Sandman = = NCR: Martin.Sandman@SanDiego.NCR.COM NCR Corporation = = Phone: (619) 485-3554 16550 West Bernardo Dr.=