We have created a service host console application that needs users key stroke to close it and the code snippet is as follows:
........