164
rated 0 times
[
167]
[
3]
/ answers: 1 / hits: 15151
/ 9 Years ago, wed, august 5, 2015, 12:00:00
So I want to test if visitors of my site have pressed Print Screen button.
As much as I was looking for, there were no information to be found how to do it. All I found was, that ir is supposed to be keyCode == 44.
With all the other buttons I tried there was no problem.
Where is my mistake?
Here's similar, working code for enter button:
window.addEventListener(keydown, checkKeyPressed, false);
function checkKeyPressed(e) {
if (e.keyCode == 13) {
alert(The 'enter' key is pressed.);
}
}
More From » event-listener