7

My favorite shortcut in IE from 10 years ago is Alt + Shift + S, which submits the form you're currently in.

On Chrome/Windows, Alt + Shift + S has started working recently (though it displays different behavior by submitting "a form" which may or may not be the form you're on). Does anyone know if there is a "submit this form" or "submit a form" keyboard shortcut for Chrome/OS X, and if not, if it is possible to create such a form?

3
  • I don't think there's such a shortcut, but I'd be interested in one for other browsers as well. Normally in OS X ⌤/enter/fn-↩ (not ↩/return) can be used to do something similar, but it doesn't work for most forms in web views... Chrome does support execute javascript via AppleScript. Does anyone better at JS know how to submit the current form?
    – Lri
    Sep 23, 2011 at 12:27
  • Lri, you have inspired me to write my own extension to pull this off. Sep 23, 2011 at 17:03
  • aaand done. Works on Windows and Mac, alt+shift+s or cmd+shift+s to submit the currently focused form. Will publish it on my site asap. Sep 23, 2011 at 20:48

2 Answers 2

5

Thanks to Lri's comment above, I've been inspired to fix this for myself. I've written a Google Chrome extension that will use the alt+shift+s keyboard shortcut on Windows/Linux and cmd+shift+s on Mac to submit the form currently being filled in. Using it now to lazily submit this answer :D

http://neosmart.net/blog/2011/google-chrome-form-quicksubmit/

EDIT

More than five years later, surprisingly no one else has implemented a similar solution so it's (finally) been published to the Chrome store and is available for installation/download.

1
  • 1
    Nice. I wanted this functionality on a site without the user having to install an extension, so I made a tiny jQuery plugin: gist.github.com/3347047
    – Henrik N
    Aug 14, 2012 at 6:54
1

Chrome

tell application "Google Chrome" to tell tab 1 of window 1
    execute javascript (do shell script "cat \Library/Documentation/Help/AppleScript.help/Contents/Resources/js/jquery.js")
    execute javascript "$(document.activeElement).closest('form').submit();"
end tell

Safari

tell application "Safari" to tell document 1
    do JavaScript (do shell script "cat /Library/Documentation/Help/AppleScript.help/Contents/Resources/js/jquery.js")
    do JavaScript "$(document.activeElement).closest('form').submit();"
end tell

Does anyone know any jQuery-less alternative to $(document.activeElement).closest('form').submit();?

2
  • You'd have to traverse the tree backwards going to each parent and checking if it's a form. Sep 25, 2011 at 15:39
  • I believe this should work (document.forms[0]).submit()
    – sairfan
    Nov 26, 2022 at 23:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .