Alberto Grespan

Command or control enter in bootstrap forms

— July 13, 2013

Using command enter to submit:

$(document).on('keydown', '.controls > .text, .controls > .string', function(event) {
  if(event.keyCode == 13 && (event.metaKey || event.ctrlKey)) {
    $('input.btn.submit-helper').click();
  }
});