Use <space> instead of <enter> for Buttons

Hello,

I just filed a bug report in the tracker (http://bugs.nextapp.com/mantis/view.php?id=490). I am not sure if I should also post here for a discussion, since this is my first post.

In our project we have several dialogs (for example, store a configuration, export to a file, ...) that contain several buttons, checkboxes and radiobuttons. Unfortunately it is not possible to toggle checkboxes or radiobuttons with <space>, which is the intuitive way of doing so. The reason for this lays in Sync.Button.js which uses explicitly keyCode 13 (<enter>). We want to be able to activate the dialog's main functionality ('save', 'export') with <enter> from anywhere within it. This is not possible if the focus is on a button since it will consume the <enter> keypress.

To fix this issue I have also comitted the patch and would be more than happy if you could integrate it into echo3.

Regards,
Michi

I share this opinion: Esp.

I share this opinion: Esp. in Web contexts enter is rather used for submitting a form than selecting a radio button. Space would be a good option for toggling a (checkbox) button.

oliverp's picture

Agree

I agree as well. enter is used to submit a form in HTML pages and space to toggle a focused button. The sames applies to desktop applications. Check out your favorite calculator - if you don't believe me.