This is how I do it in the application delegate's
applicationDidFinishLaunching: implementation...
UInt32 modifiers = GetCurrentKeyModifiers();
if ( modifiers & shiftKey ) {
// handle shift key...
}
-Ken
On Jun 24, 2011, at 12:19 AM, Bernard Desgraupes wrote:
> Hi,
>
> I need to detect if the shift key is pressed by the user during the startup
> of my app. How would I do that in Cocoa (targetting 10.5 and greater) ?
>
> The following QA seems inspiring
> http://developer.apple.com/library/mac/#qa/qa1519/_index.html
> but I don't know where to install this flagsChanged method and I can't find
> the key code for the Shift modifier.
>
> Thanks for any help,
> Bernard
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]