How to get the -real- last character typed in input with maxlength?
<p>I wanted to know which character the user is typing into an input:</p>

<p>I have an input:</p>

<pre><code>  &lt;input maxlength="20"/&gt;
</code></pre>

<p>and a script that returns the last typed char:</p>

<pre><code>var eingabe;
$('form').on('keypress', function(event) {

    /// if no whitespace:
    if (String.fromCharCode(event.keyCode).replace(/\s/g, "").length &gt; 0) {
    eingabe = String.fromCharCode(event.keyCode);
    $('#eingabe').html("&lt;div&gt;Eingabe : "+ eingabe +"&lt;/div&gt;");
   }
});
</code></pre>

<p>My question is:
because my input has a maxlength attribute, the last typed character on the keyboard is sometimes not the last -real- typed character into the input because the input is "full". How can I get the last character typed into the input?</p>