What mipey means is(in case its unclear), you can add a condition for "on key pressed"(mouse/kb)
System-close
The only reason I don't think esc should close preview window automatically, is because there's a pretty good chance you'll want to makethe esc key do something in your game, and then you couldn't test it