I wanted to run this by the forum see if anyone else can confirm -
On a PC when a button has focus, hitting the enter key executes the Button's onAction
On a Mac hitting the enter key under the same conditions does nothing.
Should the behavior be the same? Can others recreate the issue?
I don't mind opening a ticket, just want to see if this is a 'feature' first
According to this article, enter (return) does the same thing on a Mac that it does on Windows =]
I got a Mac yesterday.
OS X 8 buttons are fired when they are focused and you press space on them - for JavaFX and system applications alike.
Default system focus behaviour is that only text boxes and lists gain focus - buttons don't focus at all. Enter fires the default button regardless of whether it is focused or not - for example OK for a message dialog or Open for a file dialog. Enter sometimes performs some other action (like making an icon name editable - similar to a slow double click in Windows). Esc does a cancel function - for example getting rid of a popup window which may or may not have a cancel button in it. Mnemonics like alt+f to open a file menu do not seem to work at all for the system applications like Safari - I didn't try it for JavaFX. To get to a menu item you can press ctrl+fn+F2, then navigate around with a keyboard by using arrow keys or by typing the first letter of a menu item, then press space to activate the menu to get a drop down, then navigate some more with the keyboard and finally press space to activate the menu item you want. Pretty much every menu item in Safari seems to have an accelerator combination of the command key+another key, so perhaps that is the way things are done in Mac land. None of the standard system applications seem to have any mnemonics at all applied to buttons.
If you go to System Preferences | Keyboard | Keyboard Shortcuts there is an option which says Full Keyboard Access: All Controls. This button can also be toggled anytime in the system using the ctrl+fn+f7 combination. After the option is enabled, you can tab to a button to focus it. JavaFX does not respect this setting - you can tab to buttons and other non list and textfield controls in a JavaFX application at anytime, regardless of the Full Keyboard Access value.
I confirmed in the MAC UI Guidelines, and you are correct.
The REAL issue was that I did not define default buttons on each screen, which inherit the proper 'Enter' behavior