'done' is a global bool-variable and it controls the main-loop. (... if (done) break; ...)
So as you can see, the program should break when someone hits ESC. But the condition in the event-receiver is also fulfilled ('done' is set to true) when I move the mouse exactly at the Y-Pos 27. (It looks like the X-Pos doesn't matter).
Mh, mh. Yeah. I did not check whether the event is a key-event. With if(event.EventType == EET_KEY_INPUT_EVENT... it works how it should work.
But it's nevertheless very, very strang that an event with Key as KEY_ESCAPE is sent to the receiver when the mouse is exactly at 27.. or are mouseInput and keyInput sharing their memory? that could be the answer... ya..
try it with the logical AND (&) instead of the binary AND (&&)
Well, I think because 27 is the ASCI code for Escape and the receiver does not know what kind of code the given 27 are the receiver get the most common way - ASCI...