There's an error I can't fix

It would be a lot easier and fast, if you could just detailed the exact behaviour you want.

What should happen if:

  1. you enter the area;
  2. you exit the area;
  3. you press Q while inside the area; and you press Q again while inside the area;
  4. you press Q outside the area