holding down a button for repeated responding

Ben Robinson brobinso at mprc.umaryland.edu
Thu Apr 5 14:07:21 UTC 2007


hi all.
i'm trying to figure out a way to interpret a held-down key as a repeated key press.

for a little background, i'm working on a flicker paradigm where a trial consists of two slides presented one after the other.  one slide has green boxes around the center, and the other has red boxes in the same locations around the center.  when presented rapidly and repeatedly, the screen appears to flicker green-red.  depending on the user's response, i adjust the redness of the red objects until the green and red objects are equiluminant (at which time you should no longer notice a flicker between the two slides).  if my red starts out as 255,0,0 (an RGB value), each Button1 press would subtract 1 from the Red value, making the new RGB value 254,0,0.  i'd like to be able to cycle rapidly all the way through the 256 different levels of Red, but 256 individual button presses is not fun.

i would like the user to be able to press and hold a keyboard button down in order to comfortably cycle through all these levels of red.  

the first time it's pressed EPrime interprets the press with no problem, but the next time it cycles through the trial, if the button is still pressed, i'd like EPrime to interpret that as an additional button press.

is there a way to check the status of the button (depressed, or extended)?  that's just one thought.  anyone have a better idea?

ben robinson



More information about the Eprime mailing list