Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!AppleLink.apple.com!Greg From: Greg@AppleLink.apple.com (Greg Marriott) Newsgroups: comp.sys.mac.programmer Subject: Re: why don't i get any "keyUp" events? Message-ID: <10601@goofy.Apple.COM> Date: 8 Oct 90 06:46:54 GMT References: <1990Oct6.075532.22574@agate.berkeley.edu> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 20 In article <1990Oct6.075532.22574@agate.berkeley.edu> deadman@garnet.berkeley.edu (Ben Haller) writes: > I have a harder question. What the hell is the system event mask > *useful* for?? Why does it exist? Why don't all applications get all > events, and leave it at that? I mean, all it means is you have to have a > default case in your switch statement in your event loop, and you pretty > much always do anyway. Did Apple really think that programmers wouldn't > know how to handle it if they received keyUp events? Or is there a more > sane reason? Since the event queue is limited in size, you don't want unneeded events pushing more important ones off the front of the queue. Most apps just care about which key was pressed, not when the user let go of it. Imagine just having key events (for a moment)... including key up events would cut the amount of "type-ahead" in half. Since most apps will ignore key up events, the default is to mask them out. Greg Marriott Just Some Guy Apple Computer, Inc.