Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!rex!ginosko!brutus.cs.uiuc.edu!usc!apple!dlyons
From: dlyons@Apple.COM (David Lyons)
Newsgroups: comp.sys.apple
Subject: Re: IIGS filter procedure for dialog box
Message-ID: <35140@apple.Apple.COM>
Date: 30 Sep 89 04:58:13 GMT
References: <8909292233.aa12233@SMOKE.BRL.MIL>
Organization: Apple Computer Inc, Cupertino, CA
Lines: 24

In article <8909292233.aa12233@SMOKE.BRL.MIL> MMPR004@ECNCDC.BITNET (Scott Hutinger) writes:
>[...]  One thing you should do is filter out all possible modifier stuff
>such as:
>
>char ch;
>ch = (*theEvent).message & 0x7f   to clear out any possible modifiers

Not necessary--the modifiers are in theEvent->modifiers, not theEvent->
message.  You also don't have to (and *shouldn't*, actually) strip off
bit 7 of the character, since all 256 byte values are legal extended-ASCII
characters.  (If Key Translation is enabled, as it is by default, the option
key will result in key-down events for lots of upper-128 characters;
stripping bit 7 would make some weird option key presses appear as *other*
lower-128 characters.  This wouldn't be disasterous--just Really Strange.)

-- 

 --Dave Lyons, Apple Computer, Inc.          |   DAL Systems
   AppleLink--Apple Edition: DAVE.LYONS      |   P.O. Box 875
   America Online: Dave Lyons                |   Cupertino, CA 95015-0875
   GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
   Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons

   My opinions are my own, not Apple's.