You should check if the event.ctrlKey
flag is true, something like this:
document.getElementById('element').onkeydown = function (e) {
e = e || window.event;
var keyCode = e.keyCode || e.which,
arrow = {left: 37, up: 38, right: 39, down: 40 };
if (e.ctrlKey) {
switch (keyCode) {
case arrow.left:
//... handle Ctrl-LeftArrow
break;
//...
}
}
};
Check an example here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…