• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Key Check at Startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Key Check at Startup (From: David Remahl <email@hidden>)

  • Prev by Date: Re: Key Check at Startup
  • Next by Date: Can't cram an NSRange into an NSArray?
  • Previous by thread: Re: Key Check at Startup
  • Next by thread: Can't cram an NSRange into an NSArray?
  • Index(es):
    • Date
    • Thread