How to go to an action on pressing enter

How to go to an action on pressing enter

  
I was just wondering the following: I have a login screen where there is one inputfield where you have to give a code. Pressing a button will perform an action with the code. But I would like to have the same action as the button whenever I press enter after filling the inputfield. Now when I press enter the inputfield just goes empty and nothing else happens.
Hmm that would be a nice feature! Does anybody have a clue why this can't be done?
If you set Default=Yes in Button widget properties you'll have that behavior.
You can only have one default button per page but every web block can also have one default button.
I do not understand completely your request but here are a couple of things that might help you:

- When you press enter in a form the action that will be taken will be the action attached to the button defined with the default property set to "true". Example: on the login page of the extranet if you fill in the login information an then click enter, the action perfomed will be the one attached to the login button which is defined as default, thus trying to log you in.

- You can have automatic actions whenever you change an input field. There is a sample in the extranet that demonstrates that kind of behaviours with a drop-down list but the way to do it for input fields is exactly the same. (see http://www.outsystems.net/SupportCenter/DocumentFromExterior.aspx?DocumentId=119 ). You can hook any of the javascript events this way! (onchange, onclick, etc)

Hope it helps.
Ah yes, works now when I set the default to tue for the button. Though I could have sworn I tried that before and it didn't work. Must have overlooked it somehow. Thanks anyway, can't believe it was that simple.
I overlooked it because I had another screen in my espace for the login and in that screen the button was not set to default but it did react on pressing enter. So I thought that it couldn't be because of that.