var isShift;
if (window.event) {
key = window.event.keyCode;
isShift = !!window.event.shiftKey; // typecast to boolean
}
else {
key = e.which;
isShift = !!e.shiftKey;
}
if (isShift) {
switch (key) {
case 16:
// ignore shift key
break;
default:
//do whatever you want
break;
}
}
if (window.event) {
key = window.event.keyCode;
isShift = !!window.event.shiftKey; // typecast to boolean
}
else {
key = e.which;
isShift = !!e.shiftKey;
}
if (isShift) {
switch (key) {
case 16:
// ignore shift key
break;
default:
//do whatever you want
break;
}
}
No comments:
Post a Comment