I would like to get my page to read keystrokes wherever the person is focused on the website.
So like if they had the web page open and they pressed <kbd>1</kbd> then it did something and if they pressed <kbd>2</kbd> it did something else and so on. I don't mean to do this in an input tag.
How would I go about doing this? Can PHP just catch the keystroke and do something or does it have to respond back with AJAX? If so, how?