Trigger end of trial with Enter key


Author
Message
gjcooper
gjcooper
Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)Respected Member (499 reputation)
Group: Forum Members
Posts: 5, Visits: 38
Hi,

I have been tasked with created an experiment where the participant judges the age of a facial image.

The instructions are to use the numpad on the keyboard to enter the age, then press enter to move to the next trial.

I have so far implemented this by creating a surveypage with the image and a textbox, but I cannot see any way of detecting an enter keypress on the textbox and manually triggering the next button (or removing the next button from the screen). Is anything along these lines possible?

If this approach is not possible then perhaps something like a standard trial, that gathers multiple number responses and only triggers the end of the trial when the Enter key is pressed? Would that work?

Sorry - I am new to Inquisit and unsure as to what is possible.

Gavin
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
gjcooper - Tuesday, June 6, 2017
Hi,

I have been tasked with created an experiment where the participant judges the age of a facial image.

The instructions are to use the numpad on the keyboard to enter the age, then press enter to move to the next trial.

I have so far implemented this by creating a surveypage with the image and a textbox, but I cannot see any way of detecting an enter keypress on the textbox and manually triggering the next button (or removing the next button from the screen). Is anything along these lines possible?

If this approach is not possible then perhaps something like a standard trial, that gathers multiple number responses and only triggers the end of the trial when the Enter key is pressed? Would that work?

Sorry - I am new to Inquisit and unsure as to what is possible.

Gavin

The proper <trial>-type element to use for this would be <openended> (not a <surveypage> with a <textbox>. If configured properly, <openended> will advance upon pressing the ENTER key (see the 'Remarks' section: https://www.millisecond.com/support/docs/v5/html/language/elements/openended.htm ). And you can use the /mask and/or range to restrict input to numerical.

Quick example:

<block myblock>
/ trials = [1-4=enter_age]
</block>

<openended enter_age>
/ stimulusframes = [1=facepic]
/ numlines = 1
/ inputdevice = keyboard
/ mask = positiveinteger
/ position = (50%, 80%)
</openended>

<picture facepic>
/ items = faceitems
/ size = (25%, 25%)
</picture>

<item faceitems>
/ 1 = "face_01.jpg"
/ 2 = "face_02.jpg"
/ 3 = "face_03.jpg"
/ 4 = "face_04.jpg"
</item>




Edited 8 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search