Can hitting 'Enter' while in a field, trigger a button click?

Is there a way to bind a button to a field, so that if a user hit’s enter while the focus/cursor is in that field, it will trigger a button click action?

I have a search field and button and would like to user to be able to type into the field and click enter to trigger the Search button.

@trebuchet You can use the onSubmit event of the input widget to trigger an action when user presses the enter key in addition to triggering the action on button click. Does that work for you?

Ah, thanks @dancia , this looks like it should do it!