The old original version of RunJavaScriptOnKeyPress
If you want here is the new version
Automatically generates a thing to run JavaScript on a specific key-press
I was tired of doing it myself
If you want to use this just go here and follow the instructions
If there is a key you want to use like Caps Lock that doesn't show up when pressed this may be helpful
5.0 — This update adds pages that will generate JS for every letter (lower and upper case) and number key they can be accessed from the bottom of this page
4.0 — You can now use HTML5 in the JS
3.3 — Adds a reset button, will now remove any # above the one selected, can remove linked files
3.2 — Adds a Copy button and slight CSS3 changes
If you want to use more then one on a page you will have to style it like this:
<script>
window.onkeypress = function(event) {
if (event.keyCode == 56) {
// Your JS here
}
if (event.keyCode == 115) {
// Your JS here
}
}
</script>
Not sure yet
If you want, the code for every letter can be found here