onRelease happens when key is pressed?

I’m writing a program that has a button, and when pressed, and the shift key is pressed, will do an action. I have an onRelease function for that button also, but for some reason when I have the button pressed, and I press shift or any other key, it automatically thinks the button is being released. I was using the onMouseDown, onMouseUp functions before, but they caused me a lot of problems aswell.

Try it for yourself:

btn.onPress = function() {
trace("pressed"); //now hit a keyboard button
}
btn.onRelease = function() {
trace("released..or did you?");
}

Thanks, if anyone can help me.
Ben.