I'd rather not poll as it seems inefficient, but the logic and ordering of the Scratch commands seems to dictate that it is necessary.
Here's my example pseudo code from that picture of the Scratch script in my original email...
� � When flag clicked [
� � � �Loop forever [
� � � � � move 5 steps
� � � � � turn 5 degrees
� � � � � if key <space> pressed? [
� � � � � � �Stamp the sprite on the screen
� � � � � ]
� � � �]
� � �]
So "When flag clicked" is clearly event driven, and that's fine, that's how it works already.
But as far as I can see, that "if key <space> pressed?" cannot be event driven, because we don't want to start execution at that block if the space key is pressed, rather we want that to evaluate to true if the space key has been pressed recently ("recently" seems a problematic term to use here but that's another issue!).
Here's the code I started throwing together to make this work -- see the bit following this line:
� � type = EventTypeKeyboard
InputEventSensor>>processEvent: evt�
"Process a single event. This method is run at high priority.
So should I be doing this? Should I test out these changes and suggest a patch to Pharo? I'm happy that the answer might be "no", but what can I try instead?