Watch for mouse events

This is a discussion on Watch for mouse events within the Linux Programming forums, part of the Platform Specific Boards category; How could I watch the mouse for special events, like when the scroll wheel is pushed? E.g. When the mouse ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    17

    Watch for mouse events

    How could I watch the mouse for special events, like when the scroll wheel is pushed?
    E.g. When the mouse wheel is pressed, the shell would execute echo "hello".
    The OS is Linux.

    Is there some API in X.org that I can use?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,824
    You're trying to get mouse events into a console program?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    17
    Ah, I don't know, I just want it to run on the background and perform an action whenever the wheel mouse is clicked.

    Any ideas?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best way to fire events in C++?
    By anonytmouse in forum C++ Programming
    Replies: 13
    Last Post: 07-14-2005, 08:35 AM
  2. sending events with JScript?
    By IcyDeath in forum Networking/Device Communication
    Replies: 1
    Last Post: 12-28-2004, 06:15 PM
  3. Some bottleneck in coding digital watch simulator
    By megablue in forum C Programming
    Replies: 6
    Last Post: 08-29-2004, 10:39 AM
  4. seismic events program
    By santaclaus in forum C Programming
    Replies: 16
    Last Post: 11-23-2003, 03:23 PM
  5. ATL: fireing events from a Instanced object
    By CHECCO in forum C++ Programming
    Replies: 2
    Last Post: 09-03-2002, 08:05 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21