One of Craft’s many pleasant surprises is its support for the standard “save” keyboard shortcut. Hit
CTRL-S1 on any form, and Craft behaves just as if you’d clicked the save button. Neat.
Pretty soon, this behaviour becomes a basic expectation. It’s also around this time that people start complaining your plugin is broken, because it doesn’t save when they press
Thankfully, Craft makes it trivially easy to add this functionality to your own plugin forms. Just add
data-saveshortcut=12 to the opening form tag, and you’re done:
<form method="post" data-saveshortcut="1"> ... </form>