finkel@TAURUS.BITNET (10/06/88)
I'm writing a program that uses console.device, and I also want to read mouse input . I wanted to use console.device to read mouse clicks and position, but I could get only the left button press, and not the location. Carolyn Sheppner ( did I spell correctly ) advised me to use IDCMP for the mouse input, and that's what I did. Now, my program uses the RKM I/O routines on the console.device chapter. In the main loop, I do something like that: Status=Wait(1L<<(IDCMP_SIGNAL_NUMBER)||1L<<(IO_SIGNAL_NUMBER)); if (Status&(IDCMP_MASK)) { } if (Status&(IO_MASK)) { /* process characters here, use ConGetChat() as in RKM, i.e., use the GetMsg and WaitIO ( or was it WaitPort ? ), since we use asynchronous I/O. */ } The problem is, that I get IO signals from the IO port when there are no characters to read from the console.device, thus my program waits again in the ConGetChar() routine. The net effect is that keyboard input to my program works fine, but the mouse input works well only after I press the <return> key. I am sure that the problem is that I'm getting false signals ( thanks to SDB! ), I just don't know why. If I will not solve this, I'll return to my original method, ( i.e. read mouse events using console.device and get mouse position from Window->MouseX and Window->MouseY, although I don't like it ). Any help? ------------------------------------------------------------------------------- Udi Finkelstein | Bitnet: finkel@taurus.bitnet or finkel@math.tau.ac.il Tel Aviv University | Internet: finkel%taurus.bitnet@cunyvm.cuny.edu Israel | UUCP: ...!psuvax1!taurus.bitnet!finkel -------------------------------------------------------------------------------