I’m looking at checking what keyboard buttons and combinations have been pressed while my console application is running.
One of the things I want to do is to trap Ctrl+C within the console app so that it doesn’t just quit, instead does some tidying up and closes gracefully.
Thanks for any help you can provide
You can use the
Console.CancelKeyPressevent.