How can I get an event handler to be fired whenever a user taps on any keyboard key?
I've tried in my main component:
<template>
<div class="Controller" @keypress="handleKeyPressed">
And later on in the methods:
handleKeyPressed(e) {
console.log(e)
}
However, when I press any key - I don't see a log in the console and it seems that no key stroke is captured by vue.js
How can I get an event handler to be fired whenever a user taps on any keyboard key?