🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

cmd-ctrl-enter.js is an extremely simple jQuery plugin that binds Ctrl / cmd (?) + Enter to form submission within a textarea.


Documentation

cmd (⌘) / ctrl + enter

A jQuery plugin that enables ⌘/ctrl + enter to submit a form (when applied to a textarea).

Usage

Include cmd-ctrl-enter.js script. Then select your textareas, and call cmdCtrlEnter:

$('textarea').cmdCtrlEnter(); 

which

Returns the supported key symbol (⌘ on a Mac, Ctrl on anything else):

$('textarea').cmdCtrlEnter('which'); 

destroy

Removes the behaviour:

$('textarea').cmdCtrlEnter('destroy'); 

You May Also Like