# have all the modifiers this started with been released?
if (data.action == ob.KeyAction.Release and
not self.state & data.state):
done = 1
# has Escape been pressed?
# have all the modifiers this started with been released?
if (data.action == ob.KeyAction.Release and
not self.state & data.state):
done = 1
# has Escape been pressed?