0

When page loaded IE 11 doesn't fire event when user pressed Print Screen (keyCode 44) for first time. But it works fine after other button pressed.

var target = isIE8 ? $(document) : $window;
target.on("keyup keydown keypress", function (e) {
    if (e.keyCode === 44) { // 44 -> PrintScreen button code
        e.preventDefault();
        e.stopImmediatePropagation();
    }
});
ADreNaLiNe-DJ
  • 4,787
  • 3
  • 26
  • 35
  • add full code with html or add jsfiddle link? – Muthu May 30 '16 at 11:56
  • 1
    You should ask yourself one question: Do I really want to prevent users to capture print-screen? You should know that is impossible. – skobaljic May 30 '16 at 12:01
  • There is a lot of logic in js, and the page is pretty big. I have tried reproduce it here [link](http://www.quirksmode.org/js/keys.html). – Max Payne May 30 '16 at 13:15

0 Answers0