Forum Discussion
Accessing Mouse
I have got a USB Mouse working (I tested by doing an "cat /dev/input/mice", and moving the mouse around). However, I now need to access the mouse in one of my programs. Any suggestions on how to do this? i cannot find how to use the /dev/input/mice entry to read the co-ordinates.
4 Replies
- Altera_Forum
Honored Contributor
I would start by looking at the source for gpm (http://linux.schottelius.org/gpm/), a console-based hid handler. It should be a lot easier than piling through some X.org stuff anyway.
Cheers, - slacker - Altera_Forum
Honored Contributor
I did, but the thing is GPM even looks way too complex for me. Maybe I was just tired and didn't feel like decoding it, but I will revisit it if no one here has any little code snippets http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by jdhar@Jun 6 2006, 07:42 AM i did, but the thing is gpm even looks way too complex for me. maybe i was just tired and didn't feel like decoding it, but i will revisit it if no one here has any little code snippets http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15929)
--- quote end ---
--- Quote End --- Hi J, You may check uClinux-dist user/microwin/src/drivers/mou_ser.c .
- Altera_Forum
Honored Contributor
This looks much more readable. As usual, thanks for coming to the rescue http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif