Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jjjjjjjjjjjjjjjjjj
(function() {
function _onkeypress(key) {
switch (key.key) {
case "h":
case "H":
window.scrollBy(-100, 0);
return false;
case "j":
case "J":
window.scrollBy(0, 100);
return false;
case "k":
case "K":
window.scrollBy(0, -100);
return false;
case "l":
case "L":
window.scrollBy(100, 0);
return false;
}
return true;
}
window.addEventListener("keypress", _onkeypress);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.