I would like to be able to log the key presses on a specific page, trying to implement an \'Easter egg\' type functionality where when the correct keys are pressed in the co
I have earlier used this code to use the up/down arrows to scroll through a list, it should be relativly easy to extend this to check for a certain key combo.
$("#SearchInput").keydown(function(e){
switch(e.which) {
// User pressed "up" arrow
case 38:
navigate('up');
break;
// User pressed "down" arrow
case 40:
navigate('down');
break;
// User pressed "enter"
case 13:
if(currentUrl != '') {
window.location = currentUrl;
}
break;
}