⌘-ENTER to submit forms.
Make the Internet better, submit forms with ⌘-ENTER.
Written by Steven Harman
Related protips
3 Responses

That is already the default browser behavior. Ctrl+Enter for Windows/Linux and ⌘+Enter for Mac. There is one requisite: You have to put the form fields in a <form>
tag for that to work.

Hi @twolfosn,
For your example, ⌘+Enter does nothing for me on my Mac, using latest Chrome. CTRL-Enter, does seem to submit the form. Do you have any links to spec or docs that show this to be the default behavior across browsers?
Also, the solution I presented above handles the case of textarea
and select
elements - does the default behavior you mentioned handle those?

Ah, I must have been mistaken then. I am glad to hear Ctrl+Enter still works for form submission.
Unfortunately, a quick Google search does not turn up any results. It seems to be something I have picked up over the years.
The solution above should be applicable to any elements inside of a form (e.g. textarea
, select
, input[type=*]
).
Have a fresh tip? Share with Coderwall community!

