LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 07-07-2008, 08:26 PM   #1
wangchaoye
LQ Newbie
 
Registered: Jul 2008
Posts: 1

Rep: Reputation: 0
Smile In console program,how to receive mouse event from driver


Hello all,
I'm doing a project in linux use mips arch,so all the programs is console program.Without xwindow and other third-party gui lib,how can I use mouse,that is,how can I receive mouse event from the mouse driver and send it to the upper program.
I need a clue or example on the question, any help would be appreciated!!


Best regards,
Wang Chaoye

Last edited by wangchaoye; 07-07-2008 at 10:26 PM.
 
Old 07-08-2008, 01:57 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Quote:
Originally Posted by wangchaoye View Post
Hello all,
I'm doing a project in linux use mips arch,so all the programs is console program.Without xwindow and other third-party gui lib,how can I use mouse,that is,how can I receive mouse event from the mouse driver and send it to the upper program.
I need a clue or example on the question, any help would be appreciated!!


Best regards,
Wang Chaoye
Not sure if this will help, but Linux uses a daemon to allow you copy and paste from/to the command line, called "gpm". You may want to check that utility and see if that is any good start for you?

http://linux.about.com/library/cmd/blcmdl8_gpm.htm

Regards!
 
Old 07-15-2008, 05:00 AM   #3
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
i dont know anything about MIPS, but i think what you said means you can try reading the mouse device file. it used to be /dev/mouse a long time ago, i dont know what it is nowadays, because they've changed things a lot, eg. if you have a USB mouse you may have to read the USB port's device file or something, your distro may not be polite enough to make a "/dev/mouse" link to the USB device file when you plug in the mouse. theres something called HID compliance or whatever as well i think.
 
  


Reply



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
Need justification for mouse scroll release event dipk_23 Programming 0 05-24-2007 07:45 AM
key binding to mouse event agb32 Linux - General 0 09-04-2003 09:19 AM
CATCH mouse event!!! hongzhang Linux - Software 0 08-07-2003 02:19 AM
How can i get the mouse event on gtk_drawing_area? HopeCao Programming 1 03-19-2003 03:53 AM
how to fire mouse event using 'C' code karthikeyan Linux - Software 2 03-08-2003 11:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 05:12 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
Open Source Consulting | Domain Registration