Mark 一下:
$(document).keydown(function (e) {
console.log(e);
var keyCode = e.keyCode || e.which || e.charCode;
var shiftKey = e.shiftKey;
if (shiftKey && keyCode == 68) {//shift+D
var leftbtnDisplay = $("#Leftbtn").css(‘display‘);
if (leftbtnDisplay==‘none‘) {
$("#Rightbtn").click();
} else {
$("#Leftbtn").click();
}
}
else if (shiftKey && keyCode == 70) {//shift+F
var fullscreenDisplay = $("#fullscreen").css(‘display‘);
if (fullscreenDisplay == ‘none‘) {
resetGridLocation();
} else {
changeSizeGrid();
}
}
else if (keyCode == 27 ) {//Esc
resetGridLocation();
}
});