Test for the enter keycode (13) and if shift key was pressed.
...onkeyup = function(e) {
if (e.keyCode == 13)
{
// if (e.shiftKey === true)
if (e.shiftKey) // thruthy
{
// new line
}
else
{
// run your function
}
return false;
}
}
Edit: Accept all truthy values of e.shiftKey