Problem with Ctrl+Z and textarea
<p>I use this code <a href="http://www.openjs.com/scripts/events/keyboard_shortcuts/index.php" rel="nofollow">http://www.openjs.com/scripts/events/keyboard_shortcuts/index.php</a> for handling keyboard shortcuts.</p>

<pre><code>  shortcut.add("Ctrl+Z",function() {
  setTimeout(function() {
    var val= $("textarea").val();
    var length = val.split("\n").length;
    alert(length);
  }, 100);
  },{
    'type':'keydown',
    'propagate':true,
    'target':document.getElementById("textarea")
 });
</code></pre>

<p>I have problem when ctrl+z is pressed and there is nothing to undo - the alerts 2 ,not 1.</p>
