Re: text mode mouse routines
- Posted by Irv Mullins <irv at ELLIJAY.COM> Jan 02, 1999
- 451 views
On Sat, 2 Jan 1999 09:50:46 +0000, Thys de Jong <thys at SCSINTERNET.COM> wrote: >Thanks to all who answered my previous queeries. > >Your help is greatly appreciated. > >I've been attempting the mouse routines and so far have only managed >to show a mouse pointer while at generatinging ex.err files. > >what I'm trying to do is: > >wait for a key response with wait_key() and at the same time allow a > left mouse click to be that response: -- This routine will scan keyboard and mouse - build upon it include get.e include mouse.e constant ESC = 27 object key, mouse mouse_pointer(1) key = -1 while key != ESC do mouse = get_mouse() if not atom(mouse) then position(1,1) printf(1,"event=%02d x=%03d y=%03d",mouse) end if key = get_key() end while You can convert the x and y coordinates to row/column by dividing. Irv