Q:

Fire jQuery events on new lines in text area (not keyboard input)

I have a text area which will have multiple lines of text but entered most times by a barcode scanner or I suppose the occasional paste. 
The way the scanner works is simple the user just focuses on the text box and scans, the result is filled, interestingly enough, character by character (in very quick succession) and the last line is a new line.
What I want to do is make sure no accidental duplicates are scanned in or pasted (when there are errors 99% of the time is due to manual input as I've observed on other systems). Of course the lines are not ordered and it'd be ideal if the input order is not changed. 
What other events I can capture considering the keyboard is not used, can I capture the new line characters and dynamically check the textarea as its value actually changes even through focused. (But not on every char as that'd be slow I guess cos of the way the scanner works..)
<script>
    $("#serials-textarea").change(function () {
        alert($("#serials-textarea").val());
    });
</script>

What other events can I capture to do my validation (where alert() is or whatever suggestions you guys have)?

A:

$("#serials-textarea").keyup(function(event) {
    if (event.which == 13) {
        alert("return");
        event.preventDefault();
    } 
});

Capture "Enter" keypress which seems to be the event passed by device (carriage return). Works in FF as well as Chrome.

