Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

js-hotkeys - how to bind to the ? question mark

I've been using js-hotkeys for a while, love it.

I'd now like to bind to the ? key, but that doesn't appear to be supported. Anyone know why and how to bind to the ? question mark?

$(document).bind('keydown', '?',function (evt) {
    alert('go');
});

The above code does not work.

like image 380
AnApprentice Avatar asked Jan 06 '11 21:01

AnApprentice


1 Answers

What about

$(document).bind('keyup', function (evt) {
    if (evt.keyCode == 191)
       alert("go");
});
like image 143
Igor Avatar answered Oct 02 '22 09:10

Igor