title: prevent keyup when input focus
body: <p>I intent to trigger something with spacebar key, but spacebar should be prevent trigger when input is focus.</p>
  
  <p>I'm trying with this way, but it doesnt work well
  is there any suggestion how to do it right.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function(){
    $('input').on('blur', function(){
      $(document).on('keyup', function(e){
        if(e.keyCode == 32){
          alert("pressed!");
        }
      });
    }); 
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;form&gt;
    &lt;label&gt; Name&lt;/label&gt;
    &lt;input type="text" /&gt;
    &lt;br /&gt;
    &lt;label&gt;Pass&lt;/label&gt;
    &lt;input type="text" /&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>