Skip to content

Instantly share code, notes, and snippets.

@noppelmax
Created August 28, 2025 18:07
Show Gist options
  • Save noppelmax/4a58914f729f3d4888daac231378255c to your computer and use it in GitHub Desktop.
Save noppelmax/4a58914f729f3d4888daac231378255c to your computer and use it in GitHub Desktop.
Greasemonkey: HotCrp Arrow Key Navigation
// ==UserScript==
// @name HotCrp Arrow Key Navigation
// @namespace myhotcrp
// @version 1.0
// @description Click on n-next or n-prev when right or left arrow keys are pressed
// @author Maximilian Noppel
// @match https://*.hotcrp.com/*
// @grant none
// ==/UserScript==
(function() {
document.addEventListener('keyup', function(event) {
console.log(event.key);
if(event.key === "ArrowRight") {
const nextButton = document.getElementById('n-next');
if(nextButton) nextButton.click();
}
else if(event.key === "ArrowLeft") {
const prevButton = document.getElementById('n-prev');
if(prevButton) prevButton.click();
}
}, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment