How the Enter Key Behaves in Data-Entry Fields

Article Last Updated Oct 5, 2016

This article applies to:

The Enter key behaves differently in data-entry fields, depending on whether the slide is a question slide or a content slide.

Question slides

If the data-entry field is on a question slide (also called an interaction), pressing the Enter key on the keyboard will submit the user's response for evaluation.  In other words, pressing the Enter key is like clicking the Submit button.  This applies to the following question types with data-entry fields:

  • Graded: Fill in the Blank
  • Graded: Numeric
  • Survey: Short Answer
  • Survey: How Many
  • Freeform: Text Entry

The Enter key performs a different function in Essay questions.  Since an essay response is likely to have multiple paragraphs, the Enter key will add a line break (return) in Essay questions rather than submitting the user's response.

Content slides

When you add a data-entry field to a content slide in a Storyline project, two things automatically happen:

  • Storyline creates a variable to hold the data that the user will enter.  (To view all the variables in your project, click the "Manage project variables" button in the lower-right corner of the Triggers panel.)
  • Storyline also creates a trigger, which sets the value of the variable to whatever the user types in the field.  This occurs when the control loses focus.

But what if the user presses the Enter key?  Here's how Storyline handles that:

  • If the data-entry field is tall enough to accommodate more than one line of text, the Enter key will add a line break (return), so the user can start a new paragraph. For example:
  • If the data-entry field is only tall enough for a single line of text, the Enter key will assign the user's response to the variable.  In other words, it will submit the user's response. For example:

If you'd like the Enter key to always submit the user's response, regardless of the size of the data-entry field, add another trigger to the data-entry field that adjusts the variable when the User presses a key, and specify the Enter key.