By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,789 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

mouse clicks in console window delayed

P: n/a

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

System info: Python 2.5, OpenSuse 10.1, gpm 1.20.1, tried several
terminal types without seeing a difference.

Thanks in advance,

Nov 25 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.