$("input#chat").keypress(function(e) {
var textVal = $(this).val();
if(e.which == 13 && e.shiftKey) {
$('input#chat').val($('input#chat').val() + "\n");
}
else if (e.which == 13) {
e.preventDefault();
this.form.submit();
}
});
Bu işini görür sanırım.