LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2003, 09:48 AM   #1
karthikeyan
LQ Newbie
 
Registered: Feb 2003
Posts: 7

Rep: Reputation: 0
how to fire mouse event using 'C' code


Hello all,

I am doing a project in linux.I want to move and fire the mouse events programtically on the desktop. For example , let mouse be on the position 100,100. I want to move the mouse to x,y position using my 'C' code and fire a mouse click there. Is there any interrupt in 'C' or low level OS interrupt.

bye ...
 
Old 03-08-2003, 10:01 AM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
There is a function in C called the 'system' function. The general syntax is as follows:

ok=system("shell_commands_here");

The system function passes whats in the quoatation marks directly to the shell. If you can figure out how to do this task from a shell prompt then you can do it through your C code.
 
Old 03-08-2003, 11:35 AM   #3
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Check out the source code for xev, which tracks (and reports) X
events, including mouse movement and clicks as well as keyboard
events. If you can report it, you can probably send it. . .
 
  


Reply


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
how to fire mouse events programatically in 'C' code karthikeyan Programming 2 11-14-2010 02:03 PM
Help moving mouse with code. nonconformative Programming 1 12-02-2003 06:44 PM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:11 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