Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

248
Views
(Javascript) onkeydown doesn't work when press F11 to exit full screen?

I use this code below to count how many times does the user press F11 (on Chrome). When I press F11 to go full screen, the variable countF11 increases 1, but it doesn't change when I press F11 to exit full screen. What is the reason and is there a solution for this?

var countF11 = 0;

document.onkeydown = function (e) {
    if (e.keyCode == 122) {
        countF11++;
        document.getElementById("status").innerHTML = countF11;
    }
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Chrome intentionally prevents any keyboard event listeners from firing when F11 is pressed when the browser is in "full screen mode." This is to prevent malicious JavaScript from preventing the client from leaving "full screen mode."

Firefox does not have the same limitation; it will work just fine there.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!