LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 01-21-2008, 09:23 AM   #1
danielrex15
LQ Newbie
 
Registered: Jan 2008
Posts: 4

Rep: Reputation: 1
reading mouse device


hi,
I am new to linux .As part of my assignment ,I have been asked to read from the usb mouse pointing device. To begin with, I am not aware of the particular device in the "/dev/" directory that I need to do a read on.
I also tried to read from "/dev/input/mice" and found that it returned only 3 bytes. I went thru some of the resources onlince and found that it needs to retur struct input_event (defined in /include/linux/). So, I am not aware of how to interpret this 3 bytes that I get from reading.

Also, how can I know which device in the /dev directory represents the USB Mouse that I am using. Is there a general approach to this ?

So, I request you to kindly help me in this regard,
Thanks in advance.
Regards,
Daniel.
 
Old 01-21-2008, 09:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reading mouse device danielrex15 Linux - Newbie 5 01-23-2008 12:27 PM
Reading from the /dev/mouse RichardS Programming 4 08-16-2007 04:56 PM
reading mouse movement jdhar Linux - Hardware 4 06-06-2006 06:24 PM
reading and writing to a serial device (modem) Xanadu Linux - Laptop and Netbook 0 01-04-2005 11:05 AM
Reading USB storage device? cucolin@ Red Hat 4 02-19-2004 02:09 AM


All times are GMT -5. The time now is 02:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration