assign the Enter key trigger events on buttons on Mac

I would like to execute the onAction function of the buttons on forms by the “Enter/Return” key on Mac. Default I have to hit the “Space” key to trigger the event of the active button.
The solution should be:

application.setUIProperty("Button.defaultButtonFollowsFocus", "true");

in my onOpenSolution function. But this is not working.
Any ideas how I get this working?

Servoy 5.2.8
Java 1.6.0_24
Mac OSX 10.6.7

you could try:

application.setUIProperty(“Button.defaultButtonFollowsFocus”, true);

but it is really the look and feel that must use this hint, i don’t know if the macs look and feel really does that.

Hi Johan,

I tried the function in detail with you and also in LAF “default” and “metal”. But it doesn’t work as expected.

problem is also that that setting talks about the “default” button. Like in a dialog where OK is the default
And that is not the case for just buttons…