javascript backspace and preventing back button while still giving backspace meaning for keypress
<p>My App will allow people to write in a canvas, so I have attached a event listener to the keypress key, this fires the following function:</p>

<pre><code>var Keypress = function(event) {
    if (event.keyCode == 8) {
        chatRoom.removeLetter();
        event.preventDefault();
    }

    if(event.keyCode == 13){
        chatRoom.newLine();
    }
    chatRoom.addText(event.charCode,"White");
}
</code></pre>

<p>the issue is this, currently if someone hits backspace 1 character can get deleted then, backspace gets frozen and can not be used again until another key is pressed. However is what I am looking for is for backspace to be able to be hit many times, many characters get deleted and no one ends up going back a page.</p>

<p>In essense I am trying to find a way for the function to fire the removeLetter() event and just disable going back on the browser, However all examples I have seen ever freeze up the backspace (leading to this one letter can be deleted) or do not work (return false would just not work at all for me).</p>
