[open] Keystroke speed
Hi everyone, I am just getting started with OpenSesame for my undergrad project. But I feel a bit daunted by it.
I want to create a block where the user types text, and the program times the keypress between keys and saves the mean speed into the csv file.
I have knowledge with VB.NET/C# and Python seems simple enough. But I don't know where to start, can someone push me in the right direction?
import time
start_time = time.time()`
user_input = raw_input("")
stop_time = time.time()
chars_per_s = len(user_input) / (stop_time - start_time)
print "you typed at %.4f characters per second" % chars_per_s
Comments
Hi,
Welcome to the forum! As a general tip: you can find information on Python inline scripting on the Documentation Page.
The following script should allow users to type, and calculate the average typing speed:
Now, in your logger save the variables
responseandtypespeed(you might have to manually add those) In other experiment items, simply refer to[typespeed]if you want to use its value.Good luck!