Millisecond Forums

Pressing "Enter" to move to next page

https://forums.millisecond.com/Topic20236.aspx

By nncheek - 11/24/2016

Hello! I'm trying to make it so that, when presented with a page of instructions, participants can press Enter to move to the next page instead of pressing the space bar. Right now I'm using a page of instructions and presenting it with the ontrialbegin attribute, but I can't figure out how to change how participants advance to the next page (is there a way?). I was looking at other ways to do it and ways of specifying what would be a valid response (something like using a isvalidresponse attribute), but I can't really figure it out and would appreciate any help.

(The reason I want participants to be able to press Enter is because they can submit answers using the Enter key later on, during the open-ended trial, so I want to make it simple and just have the Enter key work throughout the entire experiment.)

Thanks so much for any help!
Nate
By Dave - 11/24/2016

nncheek - Thursday, November 24, 2016
Hello! I'm trying to make it so that, when presented with a page of instructions, participants can press Enter to move to the next page instead of pressing the space bar. Right now I'm using a page of instructions and presenting it with the ontrialbegin attribute, but I can't figure out how to change how participants advance to the next page (is there a way?). I was looking at other ways to do it and ways of specifying what would be a valid response (something like using a isvalidresponse attribute), but I can't really figure it out and would appreciate any help.

(The reason I want participants to be able to press Enter is because they can submit answers using the Enter key later on, during the open-ended trial, so I want to make it simple and just have the Enter key work throughout the entire experiment.)

Thanks so much for any help!
Nate

> "Right now I'm using a page of instructions and presenting it with the ontrialbegin attribute,"

This does not make sense. Instruction <page> elements are displayed via the <block>'s or <expt>'s /preinstructions and/or /postinstructions attributes. /ontrialbegin attributes pertain to <trial> elements only, and /ontrialbegin does not display anything, it executes logic.

To configure how <page> elements behave, you need  the <instruct> element. To have participants advance by pressing enter, specify

<instruct>
/ nextkey = (28)
...
</instruct>
By nncheek - 11/24/2016

Ah, okay, thanks very much.