Post date: Apr 6, 2015 3:54:55 PM
So you are debugging and programming and suddenly you wonder, what is the keycode for this button?
Well this little bookmarklet will let you know and cleans up after itself by using and resetting the document.body.onkeydown function. So it only works on one keypress.
javascript:(function(){var d=document.body.onkeydown;document.body.onkeydown=function(e){e.preventDefault();alert(e.keyCode);;document.body.onkeydown=d}})()