Forum Discussion

EdwardAgadja170's avatar
EdwardAgadja170
Community Member
6 months ago

Storyline apparently doesn't register triggers anymore

So I'm trying to advance to the next layer by having the learner press the CTRL + K key after typing a name in the text entry field. For no reason whatsoever, Storyline doesn't register this. I tried just the K key. Still didn't work. I tried not including a condition for the text entry field. Still didn't work.

I'm sure there's some obscure reason why it's not working on the backend as there always is, but it's deeply frustrating trying many different solutions only for it to still not work.

  • Nedim's avatar
    Nedim
    Community Member

    TextEntry3 will equal the typed value once Text Entry 1 loses focus. However, pressing Ctrl + K and clicking on Text Entry 1 means that technically, Text Entry 1 remains in focus. As long as this persists, TextEntry3 will keep awaiting its new value. Consequently, the condition "if TextEntry3 = value Ronda Sherman" will never be met unless Text Entry 1 loses focus. I suggest modifying your trigger to "When the user presses ENTER after clicking on this layer If TextEntry3 = Ronda Sherman." ENTER will ensure that the value of TextEntry3 variable is updated and Text Entry 1 is no longer in focus. Additionally, you may create an error layer that will only appear "When the user presses ENTER after clicking on this layer if TextEntry3 is not equal to Ronda Sherman". Example below. Also, you can refer to the attached video demonstrating this interaction.

    • EdwardAgadja170's avatar
      EdwardAgadja170
      Community Member

      Hmmm, that's an unfortunate limitation as I'm trying to replicate the actual system here. In the system, the way to complete the action would be through CTRL + K. There's really no way of creating a trigger or other solution to process this command? Removing the text entry value condition out of the equation?

  • Nedim's avatar
    Nedim
    Community Member

    If you prefer not to evaluate the learner's input, eliminating the text entry value condition from the equation will trigger this action with Ctrl + K. If you want to monitor and update the TextEntry3 value as it's being typed without it being constantly in focus, you can use the following JavaScript code and adjust the trigger as indicated in the screenshot:

    const inputs = document.querySelectorAll('.acc-textinput');

    inputs.forEach((i) => {
            i.addEventListener('keyup', () => {
            i.blur();
            i.focus();
        });
    });

     

    With this setup, pressing Ctrl + K won't trigger any action if the TextEntry3 value is not "Ronda Sherman" (case insensitive). However, if it matches, Ctrl + K will proceed to the next layer.