[Pharo-project] [Event related] Character vs Keys

Guillermo Polito guillermopolito at gmail.com
Tue Jan 24 14:20:43 EST 2012


While playing (again) to add Function keys support, reading documentation
of how keyboard handling works on our vm and other platforms:

Javascript: http://www.quirksmode.org/js/keys.html

And a quick explanation of Igor of how our vm works:

What puzzles me is some of the following:

- Keypress event should only be raised to send keystrokes having a
character representation.
- but some keystrokes with no character representation are taken as
keypresses! (arrowup, arrowdown, esc...) (and so, used to handle events
instead of doing it on keydown)
- the strokes above should be only raised in keydowns IMHO.
- more on, we have in Character class representations for those *non
characters* :P which is funny because they are not characters.

And everything works, and fits in a kind of strange way :).

Now, rearranging this to follow those conventions means:
- reify Keys (vs Characters).  So we can model modifier keys, function
keys, arrow keys, independent from Characters.
- Keys (non-characters) should only be raised as single events on keydown.
- and the worse part is to fix all the hardcoded shortcuts messed
everywhere in the image.

Any thoughts on this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120124/9e7c7f96/attachment-0001.html>

More information about the Pharo-dev mailing list