var el = document.getElementById("textarea")
el.addEventListener("keydown", (e)=>{
if(e.key === "Enter"){
// do something here
}
})
$('.container').on('keydown', 'input', function(e) {
if (e.keyCode === 13) {
e.preventDefault();
e.stopImmediatePropagation();
//Do your stuff...
}
});