title: How do I add event listener to document changes in vue?
body: <p>I can add a watch property to a input form. But what if user presses a key. I want print the key press when the user is on the page.</p>
  
  <pre><code>$(document).keypress(function(event){
              alert(String.fromCharCode(event.which));
          });
  </code></pre>
  
  <p>But how do I add the check for keypresses in vue?</p>