Thread: Watch for mouse events

  1. #1
    Registered User
    Join Date
    Oct 2006

    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 that I can use?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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.

  3. #3
    Registered User
    Join Date
    Oct 2006
    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, 07: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, 09: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, 07:05 AM