Ascii Equivalents for KeyUp/KeyDown events

Marcel Weiher marcel at metaobject.com
Tue Nov 28 20:40:01 UTC 2000


> From: "Andrew C. Greenberg" <werdna at mucow.com>
> As I began messing around with the new event paradigm, I noted that  
> KeyUp and KeyDown events pass individual Key Codes, rather than their  
> ASCII equivalents.
>
> Is there any reason that the ASCII equivalent, when available, is not  
> carried somewhere in the keyUp/Down event objects?  It would be
> convenient and, particularly for games, faster, to have that
> information be readily available without an additional lookup in some  
> applications without having to process two separate events.
>
> In the Macintosh implementation, this information is available
> beneath the scenes -- in fact, it is separately parsed out of a
> single MacOS event into two Squeak events.  I'm not asking for a
> change in the semantics -- just the convenience of having both
> keycode and ascii equivalent in the same keydown record.
>
> Or am I missing something?

I don't think you're missing anything.  In fact, MacOS-X gives you  
just key-up/key-down events that contain both the raw code as well as  
several translations.  That seems the correct way of handling the  
situation.

Marcel





More information about the Squeak-dev mailing list