I have a program with a set of predefined command that I will enter. A so called editor will apprear next that requires me to enter some text and then I am required to press Ctrl-Z to save and end the program. How do I incorporate the Ctrl-Z into my program so that I don't have to do it manually?