[ENH] Alternative EventSensor

Ned Konz ned at bike-nomad.com
Sat Jul 29 22:40:17 UTC 2000


"Raab, Andreas" wrote:
> 
> Folks,
> 
> After looking at Tim's EventSensor stuff I figured that there are a couple
> of things that I don't like (no pun intended). So I took a little time and
> rewrote it the way I think it should be done. 

Looks good, from brief inspection. Haven't tried it out yet.

I like that you're sending key down and up events. However, I don't fully
understand what they're supposed to be. Are you
looking to have raw keycodes (OS specific)? Or just the same old (pre-mapped)
codes from the VM?

I find the VM's mapping of keys to be a weak spot of the current implementation.
There are a number of keys I just can't use, or that don't work the way I'd like
(for instance, I don't seem to have a forward delete key in Squeak).

And I can't get raw key information (for instance, to differentiate between
a keypad "1" and a main keyboard "1").

I wonder, also, what happens on key down events? Is there both a key down
and a character event generated?

And what about keyboard auto-repeat? It's often distinguishable from the
initial key press, at least at the OS level.
You only have key down and up (as well as cooked char) events.

> I'm still trying to
> figure out how to prevent the C support code from creating raw oops (another
> thing I don't like is that with Tims implementation you have to create oops
> yourself).

Why not just pass a ByteArray to the primitive and let it stuff in raw bytes
instead of an Array (which you'd have to create oops for)?

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list