Combine Enter key and button is pressed in the When clause of triggers


I face a situation where I need to submit a step (and execute button trigger) but I want to associate the enter key to the same list of trigger.

I have found the post Key-Mapping on Steps, but it doesn’t answer my issue.

Only workaround I havec found is to duplicate the triggers:

  • 1 trigger on input field associated to “when enter key is pressed”
  • same trigger a button associated to “when button is pressed”

My expectation is to have in the same When clause : when button is pressed and on enter key is pressed.
So I can associate both action to same trigger and reduce code duplication.

thank you

Hi @thomas.riehl,

I’m with you on that one. Thats one reason why I built an input widget as custom widget by myself.

As possible workaround:

  • Make a custom widget, that detects a change of a boolean variable.

  • Put your trigger logik on this widget

  • toggle this starting vaiable by enter in the input field and by the button

→ both will start your widget and you can also start it with other trigger logic, simply by changing the variable.

btw.: It could be reasonable to check for a specific state (true) of this bool and reset it on step enter and in the widget logic itself (before fireing the event).