title: is there a function to do on a specific keypress instead of click
body: <p>i was wondering if there is a function i could use instead of using a mouse click as i have set keybinds to whenever i press it it does it on my pc , here is my code i am using for a broswer script on tampermonkey,</p>
  <pre><code>        }
          $('.pagination.prev').on('click' , function(e){
              e.preventDefault();
              setTimeout(function(){
                  getPlayerDataFromSite();
              }, 500);
          });
  
          $('.pagination.next').on('click' , function(e){
              e.preventDefault();
              setTimeout(function(){
                  getPlayerDataFromSite();
              }, 500);
          });
      }
  </code></pre>
  <p>instead of using mouse click on the next button and previous button i would like it to use b key as previous and n key as next</p>
  <p>thanks in advance for help really appriciate it</p>