How to make enter submit a text box

I’m working on a form. I’ve got a text box that takes and input string, and a submit button that triggers my workflow. I’m uncertain how to make pressing the enter button in the text box also trigger the workflow.

You’ll want a $keyboard widget. Here’s a very basic example:

\procedure myActions()
(your action widgets go here)
\end

<$keyboard key="Enter" actions=<<myActions>> >
	<$edit-text tiddler="MyTiddler" field="fieldName" />
</$keyboard>
<$button actions=<<myActions>>>Submit</$button>
2 Likes

Thanks so much, @etardiff!

The keyboard widget is one of those features where the documentation specifies all the technical details, but doesn’t have any actual examples.

Even a simple example makes a huge difference!

1 Like

A documentation update can be submitted here: TiddlyWiki — a non-linear personal web notebook