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

122
Views
Pressing the Z key to redirect isn't working
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 
<script>
   

 var keyPressed = event.originalEvent.code;
                  if(keyPressed == 'KeyZ'){
                      location.replace("https://classroom.google.com");
                  }
        </script>

When clicking the Z key, nothing happens, however when I try it on a different project. The link is avackgames.xyz

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In this case, you should use the 'keydown' event listener.

For more information please visit this website.... (Click here)

This is the JavaScript code you should add to your HTML file code. I hope it's clear and helpful, Thanks!.

<script>
    //Create event listener for 'keydown'
    window.addEventListener('keydown', KeyPressed)
        //Create a function with 'event' parameter
    function KeyPressed(event) {
        //Checking if Z key pressed, For your information, the code '90' is for the Z key.
        if (event.keyCode == 90) {
            //To be sure that the 'Z' key was pressed, let's show an alert message.
            alert('Yeeess, you clicked Z key!')
        }
    }
</script>

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!