The following code reveals a div on a keypress event of '?' (191). Works perfectly with Google Chrome but refuses to work with Firefox. Any ideas?
$(document).keyup(function (e) {
if(e.which == 16) isShift=false; }).keydown(function (e) {
if(e.which == 16) isShift=true;
if(e.which == 191 && isShift == true) {
if ($('#keyboard-shortcut-menu').css('display') == 'none') {
$('#keyboard-shortcut-menu').show();
} else {
$('#keyboard-shortcut-menu').hide();
}
return false;
}
UPDATE: Figured this one out. Firefox captures '?' char as 0 value. Check out my answer below.