I would like to save a message when user press ctrl and enter at the same time, here is my code
if (e.ctrlKey && e.keyCode == 13)
{
e.preventDefault();
saveMessage();
}
<textarea placeholder="Add a note..." id="note-content" ng-model="noteContent" ng-keyup="triggerform($event)"></textarea>
It works however, it would keep create a extra enter at the end of line which is trigger by the enter key, is there a way i can prevent the enter?