title: How can I check that a key has been pressed?
body: <p>Well I searched on Google but still didn't found the answer I was looking for.</p>
  <p>I want to check if the user pressed a key, something like this -</p>
  <pre><code>if(document.onkeyup) {
     // Some Stuff here
  }
  </code></pre>
  <p>I know I can do this, this way -</p>
  <pre><code>document.onkeyup = getKey;
  </code></pre>
  <p>But the function <code>getKey</code> cannot return values.</p>
  <p>So how can I check if the user pressed a key?</p>
  <p>EDIT : I need pure Javascript for this thing..</p>