if you log out the event object, you'll see that e.ctrlKey = true
on the keydown
event, but e.ctrlKey = false
on the keyup
event.
Why you ask?
I can't really refer you to a source or any facts, but my thesis is like this:
The e.ctrlKey
property is there for you to check if the ctrl key is pressed down while you click a button. As you'll find out by checking it out, the event object has a lot of these properties for you to check. This way, it's easier to check if the user is clicking ctrl+s or alt+f7 or whatever.
The reason the e.ctrlKey always is false is probably because is never needed. Weird perhaps, but it doesn't really make sense to have it set in the first place, given my argument above.
A solution to your problem is to check the keyCode property instead - the key for ctrl is 17.
function loopit1(e){
if(e.keyCode === 17){
alert("Key Up!");
}
}
Hope this helps!