You shouldn't be using KeyHit or KeyDown with WaitEvent() or windowed apps, they are meant for full screen use.
Why do you think there are specific events allocated for detecting keys?
KeyDown = EventID() $101
KeyUp = EventID() $102
KeyStroke = EventID() $103
Why do you think there are specific events allocated for detecting keys?
KeyDown = EventID() $101
KeyUp = EventID() $102
KeyStroke = EventID() $103