Posting Keyboard Events

2008-09-05 Thread Dave DeLong
Hi everyone, I'm having a heck of a time figuring out how to post keyboard events. I've been working on this for a couple hours, googling everything I can think of, but I'm still stuck. First off, I'm aware of the functions: CGPostKeyboardEvent() CGEventCreateKeyboardEvent() CGEventPost()

Re: Posting Keyboard Events

2008-09-05 Thread Ken Thomases
On Sep 5, 2008, at 9:15 PM, Dave DeLong wrote: How on earth can I post system keyboard events (without getting a beep)? You know, there are plenty of occasions when typing a letter causes a beep. In particular, if there's no responder which is ready to accept keyboard input. Is there a

Re: Posting Keyboard Events

2008-09-06 Thread Peter N Lewis
At 20:15 -0600 5/9/08, Dave DeLong wrote: How on earth can I post system keyboard events (without getting a beep)? As Ken mentioned, first off make sure the key has somewhere to go. After that, this is roughly the code I use in Keyboard Maestro (extracted bits and pieces, so it wont compile d

Re: Posting Keyboard Events

2008-09-06 Thread Jean-Daniel Dupas
Le 6 sept. 08 à 14:00, Peter N Lewis a écrit : At 20:15 -0600 5/9/08, Dave DeLong wrote: How on earth can I post system keyboard events (without getting a beep)? As Ken mentioned, first off make sure the key has somewhere to go. After that, this is roughly the code I use in Keyboard Maestr

Re: Posting Keyboard Events

2008-09-06 Thread Dave DeLong
Yes, thank you for asking. This code is in an IBOutlet for a simple controller object. The controller has an outlet for the window and a textfield. The first thing fun on this outlet is the following: [window makeFirstResponder:textField]; And that does work, because the NSTextFie

Re: Posting Keyboard Events

2008-09-07 Thread Dave DeLong
Not sure if this got through... I was getting "Your message is awaiting moderation messages" even though I'm signed up for the list. Dave On 5 Sep, 2008, at 9:51 PM, Dave DeLong wrote: Yes, thank you for asking. This code is in an IBOutlet for a simple controller object. The controller h