The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-02-2009
BlackLight BlackLight is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 2
Thumbs down 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?