Xlib programming - Emulating left click press/released


 
Thread Tools Search this Thread
Top Forums Programming Xlib programming - Emulating left click press/released
# 1  
Old 07-02-2009
PHP Xlib programming - Emulating left click press/released

Hi,

Lately my university asked me to develop an application to be installed on some computers for the disabled. I've developed a head tracking software (it moves the cursor on the screen following your head's movements using a webcam), and it works greatly so far except for a missing feature. I'm going to interpret a forward movement of the head (towards the cam) as a left button click, and the left button is released when the head moves back. So far I can recognize these events, but I don't know how to emulate a mouse event (left button clicked/released) using Xlib. I've tried several functions, XGrabButton as well as XSetPointerMapping, but none of them seems to fit my purpose (and there's really not much documentation about these online).

Does anyone know how I can fix this problem?
# 2  
Old 07-03-2009
Have you tried xdotool - it simulates mouse and keyboard events -
xdotool - fake keyboard/mouse input :: semicomplete.com - Jordan Sissel
# 3  
Old 07-03-2009
Thanks for your reply. Anyway I was looking for a code solution, not for an external tool...
I found a solution yesterday night anyway, using XTestFakeButtonEvent function in Xlib extension, and it seems to work greatly for my purpose ^^
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

emulating windows like delete

Hi, Trying to create a way of emulating the windows like delete environment. I have everything working apart from deleting a single folder. Such as if I have a folder with a folder it will delete the folder inside the folder but not the pervious folder and it will delete a file win that folder... (2 Replies)
Discussion started by: limpep
2 Replies

2. Red Hat

Emulating rm command

I just need to edit the "rm" command such that it should move all the files / directories to particular folder instead of deleting. Its regarding my dessertation work , started working on the source code coreutils/src/rm , can any one guide mw to create a new source code for "rm " such that it... (0 Replies)
Discussion started by: jakris
0 Replies

3. UNIX for Dummies Questions & Answers

Newbie needs help with Xlib / X11 programming,dunno who to ask,but you :(

Hi,I'm new here and to Unix also. I'm totall newbie. Here is what I have to do: -Basics of programming user interface with Xlib library -Xlib -Client/Server model of X-Windows system -Example of "Hello world" with button which changes text ,so that when u click displays another... (4 Replies)
Discussion started by: megane16v
4 Replies

4. UNIX for Dummies Questions & Answers

Left click select,right click copy

Hi all, when i ssh into my linux machine, i can do a double left click and then right click to paste it anywhere i need. However, on the actual machine, in the terminal, i cannot do a double left click and right click to paste it. i need to right click and select Copy followed by click click... (1 Reply)
Discussion started by: new2ss
1 Replies

5. Shell Programming and Scripting

emulating rm command

Hi everyone! I am trying to write a bash script to emulate the rm command, I want to save all files I delete, a bit like the recycle bin in a windows OS. My script so far is below, I still need to amend a few things, once complete I plan to alias the script to rm and use it as a safe delete... (7 Replies)
Discussion started by: jack1981
7 Replies
Login or Register to Ask a Question