Ascii Equivalents for KeyUp/KeyDown events
Lex Spoon
lex at cc.gatech.edu
Mon Dec 11 07:00:44 UTC 2000
Marcel Weiher <marcel at metaobject.com> wrote:
> > It's not
> > just the work of coming up with all the codes (XFree has about 1300).
>
> There is no work: Unicode is well defined, raw-keycodes are there.
> What else do you need?
>
Does Unicode include things like:
F1
Up-Arrow
Home
Menu
Alt
Left_Alt
AltGr
CapsLock
KeyPad0
If so, then sure, let's use Unicode. If not, then, the existing
X codes seem pretty reasonable.
By the way, we should surely have a converter to Character's as well, for
textual key presses. Squeak's Strings aren't currently in unicode, but someone
will probably manage to accomplish this difficult task at some point.
We already have good objects for encoding text, so we may as well use them.
Incidentally, do we really need the raw keycodes to be reported?
Intermediate keycodes like "shift" and "capslock" seem very useful.
Truly raw keycodes, on the other hand, can only be used by apps that are
reconfigured whenever they're loaded on a new machine. ("Please press
the Foo key....") It doesn't seem very Squeakish to require this in an
app.
-Lex
More information about the Squeak-dev
mailing list
|