Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Recording multiple mouse clicks during video

Hey all,

For my experiment I'm playing a video that I want to continue playing until the end (3 minutes). DURING the video I want to record all left and right mouseclicks that occur and when. Is this possible?


  • Alright, for now I have decided to record key presses instead of mouse clicks. The video runs until someone clicks the mouse (so until the end of the video). The video calls custom Python code after every key press.

    Now I have: log.write(u'time = %s' % clock.time())
    Ideally it would record at what time during the video (not the experiment) the key is pressed, during which instance of the variable target_video I have created (one, two, three or four) and which key (ideally only left arrow and right arrow are allowed).

  • Hi,

    Not sure whether there are better solutions (I have no experience with videos in experiments), but right before the video start, you can take the time and save it in a variable, right after it stops you do the same (sort of as a check whether the duration is what you expect it to be). During data analysis, you can then simply take the difference of key presses and timestamp before video onset as proxy for time of key presses relative to video onset.


Sign In or Register to comment.