main() is automatically called as a starting point for your program, so it doesn't make much sense calling it again. I see that you're using Main() as a name, as opposed to main(), but that's very ambiguous and to be avoided.

You will need to repeatedly check the keyboard (standard) input until a certain key is pressed. When it is, you can trigger the function you like.