I am trying to detect the event for ctr l+e in java-script. My code is given below.I get alert for ctr l and e key action separately but when i put those two condition in the and logic i don't get any output. Any suggestion where i am doing wrong ?
<script type="text/javascript">
document.onkeydown = function(evt) {
evt = evt || window.event;
if (evt.keyCode == 17 && evt.keyCode == 69) {
alert("ctrl-e is pressed");
event.preventDefault();
}
}
</script>