| PLEX86 | ||
|
reading mouse coordinates 1502On Fri, 12 May 2006 11:15:19 -0400, Gerald Pollack staggered into the Black Sun and said: IIRC, the kernel mouse modules return no data until-unless there's a mouse event of some sort. Moving the mouse (any direction) more than 1 mickey or pressing any button triggers an event. Change your logic so that you report that data every N milliseconds if you don't have a MotionNotify event within N milliseconds. ? What's your *real* ultimate goal? Most of the time, people can give you better answers and-or point you to already existing code if you say something like "I want to create a new X input module for a FooMouse" instead of asking low-level questions. Or ask the low-level questions, but also include a "big picture" statement. Reading mice and interpreting mouse data is a solved problem for 99.9% of mice, after all, and lots of code has been written to do things with mice. main returns int. fread() blocks. I think you want something nonblocking here, so you can do other things if there's no data on the mouse. Check "man 3 unlockedstdio" for starters. reading mouse coordinates 1503 On Fri, 12 May 2006 13:36:45 -0400, Gerald Pollack staggered into the Black Sun and said: So the only hbuttle is to make... This looks like a good way to lose spectacularly unless you know exactly what mouse protocol is being used. (Yes, modern mice report data in IMPS-2 or ExPS-2, but someone's going to want to use this with a 9-pin serial eventually.) Also,dev-mouse may not exist, and the new thing that's guaranteed to be there isdev-input-mice . Ah well, HTH, comparing suse 10 to fedora core 45 1504 On Fri, 12 May 2006 08:47:17 -0700, ajagwe Underneath the covers all Linuxes are pretty much the same. They use the same kernel, the same applications, they offer... comparing suse 10 to fedora core 45 1505 Dan C All OSes suck. The only difference is that one sucks more than the other at different times. When needed the most, like people, OSes differ too. Anyway, SuSE 10... -- Matt GThere is no Darkness in Eternity-But only Light too dim for us to see Brainbench MVP for Linux Admin mail: TRAP + SPAN don't belong ----------------------------- penguins, is Tux." --MegaHAL
|
||||