Hi, I am attempting to detect mouse clicks from within curses, using "select" on sys.stdin. It is working great within an xterm under X, but not very well in a "real" linux console. When I click my mouse while on the "real" console, nothing happens at first, even on repeated clicks. Once I press a keyboard key, I see a "409" in my trace, indicating the mouse event. The next keystroke will bring up the two keyboard events. The additional mouse clicks (all but the first or all but the last, I don't know) are lost.
I am wondering if someone could tell me why this is happening, and more importantly, what to do about it (short of changing the entire detection loop to busy polling. I noticed I am not the first with this problem but I haven't yet found a solution posted. Additional observations: Happens with the last gpm, regardless whether compiled --without-curses or not. I do see my mouse events happen instantly watching the output of gpm's "mev". Interestingly, I see the mouse clicks almost immediately when I code a busy loop around screen.getch(). System info: Python 2.5, OpenSuse 10.1, gpm 1.20.1, tried several terminal types without seeing a difference. Thanks in advance, Frank -- http://mail.python.org/mailman/listinfo/python-list