$(document).bind('keydown', function(e) { if (e.keyCode == 27) $('#input').focus(); return true }); 27 is the ESC key. Check out the ascii table for the keys you want.
2009/6/2 Adam S <ascheinb...@gmail.com> > > I'm trying to make the cursor focus on a certain input element when > someone hits a certain key combo (such as Shift+S). Does anyone know > how you attach a listener like that and bind it to a key combo? > > Thanks in advance, > > Adam > -- Gustavo Salome Silva