Created
January 13, 2017 10:59
-
-
Save kikairoya/41a59d1d83b4ad0d357c5adf8ab756d8 to your computer and use it in GitHub Desktop.
jjjjjjjjjjjjjjjjjj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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