I actually have an external keyboard with 15 keys. I developped a program "console app" to make several things following an XML. My program actually works like that :
- Program has been launched,
- Initialization,
- Loop with Console.ReadKey(),
- If the key is exit, we exit the loop. If it's not, we launch what have been set in the XML file.
The fact is that, even if my program works very fine, I can only use it while having the focus of my console app (thanks to Console.ReadKey()).
I now want my program to work like that :
- Program has been launched,
- Initialization is made,
- Reduce console app,
- Still able to get the key press.
I already did something like that, without using hooks but I can't find my source code. I'm just able to remember that I had to set my main as threadable, to make get the function working.
I would like to know if there is another way to get the key press without focus and hooks or hotkeys ? Then, if nothing else exists, I would like to have "a comparison" between hooks, hotkeys or whatever exists, or explanations on how those solutions works. This way, I will finally be able to understand, and I will be able to know what to use, as I don't wan't to use what I'm not able to explain myself.
Thanks