i would like to create method which will run when any keyboard key will down, and then i will check which key was down. What is important, it should run even if focus will be out of any inputs and so on.
I've created evoking when focus is in 'input' using:
@keydown.native="keymonitor"
but i would like to evoke 'keymonitor' method when there is no focus on input, but coursor is anywhere on website and focus is anywhere.
How to do it? if a add
@keydown.native="keymonitor"
to general div or body, it doesn't work.
Thanks for help.