Installing carbon event handlers into a cocoa application
Installing carbon event handlers into a cocoa application
- Subject: Installing carbon event handlers into a cocoa application
- From: "Justin Walsh" <email@hidden>
- Date: Sun, 12 Nov 2006 10:08:36 -0700
Hello,
Now I know this may sound strange or silly, and that the most obvious and
abundant response is to just use Cocoa directly to do what i am trying to
do. So please do not reply with such a response.
What I am after is using carbon to handle keyboard and mouse input in a
cocoa application. I already have an Input Class that works in carbon by
getting a windowRef from the carbon window and then installing the event
handlers for the keyboard and mouse input, joysticks in the future.
I created a simple cocoa application and am able to get the windowRef and
pass it to my class. From there it is finding the window, and installing
the event handlers without returning any errors. However in the cocoa
application, it is not showing any response.
I started to look into subclassing the NSApplication class, and think this
is where the solution is. My guess is that cocoa is absorbing the keyboard
and mouse events, because by default it also creates event handlers for
these actions.
My question is, what should i start looking at to disable or overwrite the
keyboard and mouse, so my custom carbon based input code can handle the code
instead. The fact that carbon is handling the windowRef i pass it alone
makes me think that it is perfectly possible to do such a task.
Best Regards,
Justin Walsh
--
//------------------------------------------------
The blog: http://blog.trickfly.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden