please accept my apologies, I should be more verbose in my comments. The whole implementation is in tamgusys.cxx. See inmouse and outmouse for more details. Basically, inmouse activates the mouse catching events, which are sent through getchar. Once, the mouse has been activated, you can use some primitives mouedown1 our mouseup, which takes as input the string returned by getchar and returns the x,y coordinates