Howdy, Stranger!

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

Supported by

[solved] Collect semicolon responses?

edited August 2011 in OpenSesame
Hi again :)

Is there some way to collect keyboard responses with the semicolon (;)?  The difficulty is that the allowed responses takes a semicolon separated list, so including a semicolon causes an error.

Thanks,
Per

Comments

  • edited 10:20PM

    Hi Per,

    No :O Not through the keyboard_response item anyway. I opened an issue on GitHub.

    You can do it fairly easily using an inline_script though:
    from openexp.keyboard import keyboard
    my_keyboard = keyboard(self.experiment, keylist = ["'", ";"], timeout = 3000)
    start_time = self.time()
    key, end_time = my_keyboard.get_key()
    self.experiment.set("response", key)
    self.experiment.set("response_time", end_time - start_time)

    Also, see the openexp.keyboard api.

    Sebastiaan

Sign In or Register to comment.