Javascript: Key Detection

I have a function that is called on the onkeyup event for a textarea:

lArea.onkeyup = updateLivePreview;

in my updateLivePreview function I need to check if the key that was released was infact the Enter button, if so do x else do y. How would I acheive this?