First, I'm working on Mac but it was also tested on a Windows PC. I wrote a small keylogger in Javascript that is listening to keydown and keyup events and manages an array of the currently pressed keys. It works with every combination of keys, except the Mac printscreen combination of Command+Shift+3. It works with 2 in the end and actually every character that is not 3. Is there maybe something preventing from detecting a printscreen?
Asked
Active
Viewed 275 times
1
-
printscreen is an operating system function ... the keystroke wouldn't "make it" to the browser :p so, it's actually the operating system itself that prevents the detection of printscreen by the browser – Jaromanda X Oct 02 '18 at 11:36
-
So, is it actually impossible to detect a printscreen? – Kprmn5555 Oct 02 '18 at 11:55
-
I won't say impossible because nothing is impossible. Highly unlikely though – Jaromanda X Oct 02 '18 at 12:04
-
Any ideas maybe? :) – Kprmn5555 Oct 02 '18 at 12:08
-
No ... why do you need to know if a person executes a print screen on their computer? – Jaromanda X Oct 02 '18 at 13:09
-
Not on their computer, but on my website. Which is sometimes the same but the issue is the printscreen of my website. – Kprmn5555 Oct 02 '18 at 13:21
-
So you're trying to prevent people from capturing an image of your website? on Mac, once they press `Command+Shift` set `document.body.style.display='none'` – Jaromanda X Oct 02 '18 at 13:41
-
I'm not trying to prevent the printscreen, I only want to know that it happened :( If the goal was prevention then that could have been a good idea. Although, that wouldn't work on PC. – Kprmn5555 Oct 03 '18 at 07:13