title: Handle key press by function in VueJs
body: <p>in my component I am using VueStrap's modal like this:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;template&gt;
      &lt;modal-window v-model=&quot;show&quot; v-on:keyup=&quot;keyHandler($event)&quot; @ok=&quot;submit()&quot; @cancel=&quot;cancel()&quot; @closed=&quot;close()&quot; ... &gt;
         ...
      &lt;/modal-window&gt;
   ...
  &lt;/template&gt;
  &lt;script&gt; 
      ...
      methods: {
         keyHandler (event) {
             console.log(event);
         }
      },...
  &lt;/script&gt;
  </code></pre>
  <p>I want handle key press when that modal is opened and ensure submit modal when enter pressed or close modal when esc pressed.</p>
  <p>I added custom function <code>keyHandler</code> which is unfortunately never fired. Can you tell me how to fix code to handle key press in that function? Or when is better way how to close and submit vue strap modal I will be grateful for advice. Thank you.</p>