Hey all,
Ok, I have figured it out. Running as root did the trick. After this
worked, I wondered if I had left the enable assistive devices checkbox off
from a prior experiment, and behold it was off! My bad on that (and I even
said it was on in my original post).
I went back and read the
>
>Event taps receive key up and key down events if one of the following
> conditions is true: The current process is running as the root user. Access
> for assistive devices is enabled.
Woops, I forgot that you said you enabled access for assistive device. I
just made a quick test project an
> James is exactly right, you're releasing the Event Tap before you enable
it.
> You should not release the event tap if you want to use it, it needs to
hang
> around for as long as you need it.
It's not mentioned in the docs, but the CFRunLoopSource created by the call
to CFMachPortCreateRunLoopS
On 11/08/2009, at 2:37 AM, James W. Walker wrote:
I compared your code to the code that I use that gets key down
successfully. One difference is that I don't immediately CFRelease
the event tap and source, I keep them around as long as I use the
tap. Another is that the first 2 parameter
Thanks all for some tips. I'm going to try the following ideas and I'll let
you know how it goes:
- Run as root
- Try just trapping on keyboard events
- Append my event tap to the tail, and try annotated.
On Mon, Aug 10, 2009 at 9:37 AM, James W. Walker wrote:
>
> On Aug 9, 2009, at 3:15 PM,
On Aug 9, 2009, at 3:15 PM, Nat Burke wrote:
I have posted my event tap creation code below - I've searched all
over
the mailing list and the net to see if I could find a solution, but
I am
genuinely stuck. Any help is greatly appreciated!
// Create an event tap.
eventMask = CGEvent
> also show that no bits in the eventMask are cleared away. Also, I do have
> 'Enable Assistive Devices' checked (or else I wouldn't even get the mouse
> events I'd imagine), so I don't think thats the problem.
I seem to remember a discrepancy between the documentation on event
taps, and what act
Hi all,
I'm having some difficulty with event taps. I am creating my event tap
from the 'awakeFromNib' function for my overloaded NSWindow.
The problem is that keyUp and keyDown events are never trapped in my
callback. I can see all the mouse events, and even the modifier keys
(shift, optio