If I understand you correctly, you're describing how the operating system works. It sends key presses and key releases to the focus window. In this case you press a key to make the pally move, and the pally's window receives a "key down" signal from the operating system, so the pally starts moving. Then you change the focus to the shaman's window. Then you release the key. The operating system sends the "key up" signal to the shaman's window. This has no effect since the shaman isn't moving. Meanwhile the pally keeps moving because no signal has been sent to his window telling him to stop.