4

Chrome is eating F11 key press event when the browser is already in full screen mode.

$(document).on('keydown', function(e) { 
     console.log(e.keyCode);
});

Above code prints the key code when F11 is pressed for the first time and chrome switches to full screen mode, however if F11 key is pressed again chrome switches to normal mode, but eats the F11 key press event.

Is there any way to handle F11 event on chrome in full screen mode ?

PLUNKER

msapkal
  • 8,268
  • 2
  • 31
  • 48

1 Answers1

6

Chrome prevents this key detection, and not by accident. This is to prevent developer's code from forcing the user to stay in full screen. When Chrome is in full screen mode, there is no way to prevent clicking F11 via Javascript.

Koby Douek
  • 16,156
  • 19
  • 74
  • 103