Re: detect control key
Re: detect control key
- Subject: Re: detect control key
- From: Philip George <email@hidden>
- Date: Mon, 29 Jul 2002 15:28:28 -0500
We all have different concepts of what's "convenient." I prefer to use
my own naming convention and I also prefer to have one name symbolize
exactly which keys are held down instead of ORing several of them
together. Neither way is better than the other; they are simply
different ways of doing the same thing.
I felt it was **HELPFUL** to offer **one** way, that I personally find
very convenient, to do what this person is asking.
Additionally, I longhanded the names in the post for clarity. Those
aren't the actual names I use. For instance:
#define mask_ShiftControlOptionCommand 6912
would actually (in my code) be:
#define mask_scoa 6912
Thanks.
- Philip
On Monday, July 29, 2002, at 03:08 PM, Nicholas Riley wrote:
>
*This message was transferred with a trial version of CommuniGate(tm)
>
Pro*
>
On Mon, Jul 29, 2002 at 01:59:46PM -0500, Philip George wrote:
>
> [3] Then add the following #defines (not necessary, but VERY
>
> convenient):
>
>
>
> #define mask_Shift 512
>
> #define mask_Control 4096
>
[...]
>
>
No, not necessary because Carbon already defines these, see Events.h.
>
>
Also, IMO it makes no sense to define composite masks when you can
>
just use bitwise or (cmdKey | optionKey).
>
>
--
>
=Nicholas Riley <email@hidden> |
>
<http://www.uiuc.edu/ph/www/njriley>
>
Pablo Research Group, Department of Computer Science and
>
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.