Catch mouse events (Globally) BIG PROBLEM !

  • Hi all,

    I have to catch mouse events (globally and before all applications), after
    this I have to send the same event (or maybe modified one) to the right
    application.

    It's very important but I am a little bit disapointed.

    I've taken a look in CoreGaphics frameworks, but there is nothing to catch
    mouse events, only to post...
    So what can I do ?

    I have heard that "in theory" I could use HID Manager, but I am unable to
    find some informations about it.

    And I think my last choice will be write a mouse driver with IOKit, but how
    ? I saw in  "USB.h" header that there is a struct which contain mouse
    position and button number, maybe it's interested... but I never wrote a
    driver and didn't find any examples.

    Here's my problem, I'm really really disapointed, so if someone can help me,
    it will be great, it's very important for me.

    Thanks.

    Thierry