Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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? –  ؘؘؘؘ Sep 23 '11 at 12:27
    
Lri, you have inspired me to write my own extension to pull this off. –  Mahmoud Al-Qudsi Sep 23 '11 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. –  Mahmoud Al-Qudsi Sep 23 '11 at 20:48

2 Answers 2

up vote 3 down vote accepted

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/

share|improve this answer
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 '12 at 6:54

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();?

share|improve this answer
    
You'd have to traverse the tree backwards going to each parent and checking if it's a form. –  Mahmoud Al-Qudsi Sep 25 '11 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.