﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » Trigger end of trial with Enter key</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 09 Apr 2026 18:14:02 GMT</lastBuildDate><ttl>20</ttl><item><title>Trigger end of trial with Enter key</title><link>https://forums.millisecond.com/Topic21787.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;I have been tasked with created an experiment where the participant judges the age of a facial image.&lt;br/&gt;&lt;br/&gt;The instructions are to use the numpad&amp;nbsp;on the keyboard to enter the age, then press enter to move to the next trial.&lt;br/&gt;&lt;br/&gt;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?&lt;br/&gt;&lt;br/&gt;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?&lt;br/&gt;&lt;br/&gt;Sorry - I am new to Inquisit and unsure as to what is possible.&lt;br/&gt;&lt;br/&gt;Gavin</description><pubDate>Tue, 06 Jun 2017 21:05:07 GMT</pubDate><dc:creator>gjcooper</dc:creator></item><item><title>RE: Trigger end of trial with Enter key</title><link>https://forums.millisecond.com/Topic21788.aspx</link><description>&lt;div data-id="21787" class="if-quote-wrapper" unselectable="on" data-guid="1496808092151"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21787" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="21787" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="21787" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;gjcooper - Tuesday, June 6, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21787"&gt;&lt;div class="if-quote-message-margin"&gt;Hi,&lt;br/&gt;&lt;br/&gt;I have been tasked with created an experiment where the participant judges the age of a facial image.&lt;br/&gt;&lt;br/&gt;The instructions are to use the numpad&amp;nbsp;on the keyboard to enter the age, then press enter to move to the next trial.&lt;br/&gt;&lt;br/&gt;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?&lt;br/&gt;&lt;br/&gt;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?&lt;br/&gt;&lt;br/&gt;Sorry - I am new to Inquisit and unsure as to what is possible.&lt;br/&gt;&lt;br/&gt;Gavin&lt;a class="if-quote-goto quote-link" href="#" data-id="21787"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;The proper &amp;lt;trial&amp;gt;-type element to use for this would be &amp;lt;openended&amp;gt; (not a &amp;lt;surveypage&amp;gt; with a &amp;lt;textbox&amp;gt;. If configured properly, &amp;lt;openended&amp;gt; will advance upon pressing the ENTER key (see the 'Remarks' section: &lt;a href="https://www.millisecond.com/support/docs/v5/html/language/elements/openended.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v5/html/language/elements/openended.htm"&gt;https://www.millisecond.com/support/docs/v5/html/language/elements/openended.htm&lt;/a&gt;&lt;/a&gt; ). And you can use the /mask and/or range to restrict input to numerical.&lt;br/&gt;&lt;br/&gt;Quick example:&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-4=enter_age]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;openended enter_age&amp;gt;&lt;br/&gt;/ stimulusframes = [1=facepic]&lt;br/&gt;/ numlines = 1&lt;br/&gt;/ inputdevice = keyboard&lt;br/&gt;/ mask = positiveinteger&lt;br/&gt;/ position = (50%, 80%)&lt;br/&gt;&amp;lt;/openended&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture facepic&amp;gt;&lt;br/&gt;/ items = faceitems&lt;br/&gt;/ size = (25%, 25%)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;item faceitems&amp;gt;&lt;br/&gt;/ 1 = "face_01.jpg"&lt;br/&gt;/ 2 = "face_02.jpg"&lt;br/&gt;/ 3 = "face_03.jpg"&lt;br/&gt;/ 4 = "face_04.jpg"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 06 Jun 2017 21:05:07 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>