OnKeyPress Enter in Mendix

0
I would like to run a micro when the enduser presses on the ENTER when it has the focus on a specified field. For example: I've created a custom search field in the left navigation. The user types in this field '1000123' folowed by: 1) ENTER ==> microflow should be triggerd 2) Leave the field by usign the TAB ==> do nothing Do i need to build my own widget for this?
asked
4 answers
0

If you type something in your search field and press enter, a normal On Change microflow action is triggered, so that does you requirement 1). Unfortunately, the On Change microflow is also triggered if you enter text and then tab out of the field, so it does not fulfill you requirement 2)

answered
0

Coincidentally we created a widget, which can connect a microflow to a system key of your choice. We'll put it up for the appstore once approved, or you could try it yourself with this lib: http://www.openjs.com/scripts/events/keyboard_shortcuts/

answered
0

What is the reason you want to work specially with ENTER and TAB? Could you trigger the expected behaviour through verifying if the form field has changed... ex. Is it an idea to default it to "Search" or "99999" and check for changed value...

answered
0

I've created my own widget in the end. Based on the widget called "OnChange inputbox"

But than i used the onkeyup event to check for the ENTER character. Ifso run the microflow if not do nothing. Works perfectly.

answered