setting remote preview server and escape key listener