How do I go about binding a function to left and right arrow keys in Javascript and/or jQuery? I looked at the js-hotkey plugin for jQuery (wraps the built-in bind function
You can check wether an arrow key is pressed by:
arrow key
$(document).keydown(function(e){ if (e.keyCode > 36 && e.keyCode < 41) { alert( "arrowkey pressed" ); return false; } });