Detect if a character or number has been typed
<p>I would like to set up a home page where pressing any character (lowercase or uppercase) or any number redirects the user to the <code>login page</code>, as the home page itself doesn't have anything to do that requires typing.</p>

<p>My first attempt was this:</p>

<pre><code>document.onkeyup = function() {
  document.location.href = "/login"
}
</code></pre>

<p>This works but it works for <i>every</i> key, including cursors, tab, and even caps lock. How can I restrict this function so it only responds to characters and numbers?</p>
