[etoys-dev] Testing needed keyboard events
Steve Thomas
sthomas1 at gosargon.com
Sat Feb 13 21:27:05 EST 2010
That was easy (installation that is). Installed and did some initial basic
testing on Macintosh v10.6.2
Behavior Observed:
1. For a script set to run when: keyDown
1. scripts run once when any key is pressed down
2. scripts continue to run if you hold the keyDown for more than about
1/2 second and will run until key Up.
2. For a script set to run when: keyUp
1. script runs once on keyUp
3. For a script set to run when: keyStroke
1. same behavior as keyDown, test method below
1. tested with two objects each moving forward 5 one on keyDown the
other on keyStroke
2. pressed a key (quick down up) and both moved forward 5
3. pressed a key and held it down for a while and both moved
forward the same distance
4. If the "Text" object has a script which runs when "keyDown" et al,
that script will run when you press keys to enter text in "Text". Other
Objects scripts will not run in this case.
I could see the usefulness for this, but think in most cases (especially
game playing) it would be an undesired behavior.
5. keyDown and keyStroke seem to have the same behavior
Feedback:
1. It seems the modification gives the ability to run a script on
specific events (keyDown, keyUp, keyStroke) but does not allow the ability
to run the script based on a specific key being "Down|Up|Stroked"
2. What is needed for two+ player games is the ability to execute scripts
when multiple keys are being pressed and/or held down at the same time,
along with the ability to run specific scripts (or sections within a script)
based on the key being pressed.
Stephen
On Sat, Feb 13, 2010 at 4:12 PM, Karl Ramberg <karlramberg at gmail.com> wrote:
> Steve Thomas skrev 2010-02-13 22:05:
>
> Karl,
>
> I can test on Macintosh, but not sure how to incoporate the .cs files
> into my Etoys. Have development experience but no squeak experience. How
> can I install KeystrokeScriptInstatiation.4.cs ?
>
>
> You can Drag and Drop it on the Squeak desktop.
> Then select 'fileIn entire file'
>
> In the script editor you can now select keyStroke keyDown or keyUp
>
> You still have to test if the key event was a <up> or <down> etc.
>
> Karl
>
>
>
>
> Stephen
>
> On Sat, Feb 13, 2010 at 2:47 PM, Karl Ramberg <karlramberg at gmail.com>wrote:
>
>> Hi
>> I made it possible for scripts to trigger on keyStroke, keyDown and keyUp
>> events.
>> It works on windows but I think some testing on other platforms are
>> needed.
>>
>> Go to
>>
>> http://tracker.squeakland.org/browse/SQ-331 and download
>> KeystrokeScriptInstatiation.4.cs
>>
>>
>> Feedback would be great :-)
>>
>> Karl
>>
>>
>>
>>
>>
>> _______________________________________________
>> etoys-dev mailing list
>> etoys-dev at squeakland.org
>> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakland.org/pipermail/etoys-dev/attachments/20100213/a9c83b0a/attachment.html
More information about the etoys-dev
mailing list