Re: Key Check at Startup
Re: Key Check at Startup
- Subject: Re: Key Check at Startup
- From: Martin Weil <email@hidden>
- Date: Wed, 19 Jun 2002 21:26:52 +0200
>
#import "NSEvent-CarbonAdditions.h"
>
#import <Carbon/Carbon.h>
>
>
@implementation NSEvent (ModifierKeys)
>
>
+ (BOOL) isControlKeyDown
>
{
>
return (GetCurrentKeyModifiers() & controlKey) != 0;
>
}
>
>
+ (BOOL) isOptionKeyDown
>
{
>
return (GetCurrentKeyModifiers() & optionKey) != 0;
>
}
>
>
+ (BOOL) isCommandKeyDown
>
{
>
return (GetCurrentKeyModifiers() & cmdKey) != 0;
>
}
>
>
+ (BOOL) isShiftKeyDown
>
{
>
return (GetCurrentKeyModifiers() & shiftKey) != 0;
>
}
>
>
@end
Yes I9ve seen that before, but I am sorry I don9t know how to implement
this.
Thanks,
Martin
--
http://www.mweil.net
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.