Text entry questions

Nov 16, 2021

I am having trouble creating text entry questions that function how I want them to. I've set up the Tab key as the Submit key. What I want to do is if they type the correct entry and press Tab, it continues to the next slide. If they type something wrong and press Tab, they get incorrect/try again feedback. I've tried reordering triggers (when user presses Submit, jump to next slide) and various other things, and can't get it to work. Can anyone help and/or does anyone have a template of this they'd be willing to share? Thank you!

4 Replies
Maria Costa-Stienstra

Hi, Carolyn.

Thank you for reaching out!

Without seeing your file, my initial thought is that the issue has to do with Tab being an accessibility key that also removes focus from the text input field.

Since the standard trigger is Set TextEntry equal to the typed value when Text Entry loses focus, using a trigger connected to the Tab key does not allow the focus to be removed from the input, so the value is never assigned to the variable.

For example, if my setup is:

  • Set TextEntry equal to the typed value when text entry loses focus
  • Jump to the next slide is when the user presses Tab if TextEntry = "dog"
  • Show layer Incorrect when the user presses Tab if TextEntry is different than blank and different than "dog"

If I type "dog" in the text field and then press Tab, the variable doesn't receive the value because Tab is being used for something else. If, however, I click the slide first (focus removed, variable set) and then press Tab, it should work.

While I don't advise using Tab for anything else, since it can clash with accessibility best practices, if you can share your .story file here, other members in our community might have suggestions for what you're trying to achieve.

I hope this helps! 

Lauren Connelly

Hello Carolyn!

Thank you for sharing your project! There isn't an option to turn off the default behavior of the Tab key, and it wouldn't be something we recommend since adjusting the behavior of keyboard shortcuts could prevent learners from engaging with a course. 

Since the Tab key is used to move to the next focusable item, you might consider suggesting a different keyboard command.