|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Let me follow up on Matt's question. I have an application (Keyspan Digital Media Remote) that sends keystrokes to other applications. It uses CGPostKeyboardEvent for this. The OS X and Classic environments respond differently when there's a delay between key-down and key-up actions. If I do this
CGPostKeyboardEvent(charCode, keyCode, keyDown=1);
// some time elapses
CGPostKeyboardEvent(charCode, keyCode, keyDown=0);
and an OS X application is in the foreground, it receives a single key down, followed up a key up later. A Classic application in the foreground receives a key down, some number of key repeats, and a key up.
Is this a bug? Ideally, I'd like both OSX and Classic apps to work the way OSX apps do, but if there's some architectural reason that doesn't make sense, then I'd like some way of figuring out whether to issue the key up immediately (so as to make the Classic apps work right).
|>CGPostKeyboardEvent in OSX/Classic (was: Re: Determining which environment are other apps running in) (From: Stephen Malinowski <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.