how to measure the duration of a key press\ the time of it's release

Ziv Ronel ronelziv at gmail.com
Wed May 29 04:27:08 UTC 2013


hello E-prime hive brain, 

I know it's probably dead simple but iv'e been at it for a week now.

i'm doing a study in which random pauses are introduced, in a frustrating 
matter, and the participants should press keys randomly in an attempt to 
make the program work. 

i need to measure how many frustrated keypresses there were, at what rate, 
and for how long each key was down (to measure these long angered key 
presses). 

I managed to create the first two, but haven't been able to measure 
duration. 
the only thing that came even close was this piece of code that I wrote:

        Dim theResponseObject As RteRunnableInputObject
Set theResponseObject = CRteRunnableInputObject(Rte.GetObject("Wait1"))

        Debug.Assert Not theResponseObject Is Nothing

Dim KeyReleaseTime As Long
If ebStatePress = 0 Then
KeyReleaseTime =  Clock.ReadMillisec
End If

        c.SetAttrib "KeyPress" & nIndex & "Release", KeyReleaseTime


(there is also a loop in there designed to redo that for every key press 
made in "wait1", but i've left it out)


HELP!

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/35f3673a-e830-4b58-8d09-51c86d567f19%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130528/793c7ee1/attachment.htm>


More information about the Eprime mailing list