Console app: How to continue receiving keystrokes when console window is not in focus

Viewed 37

i wrote a console app in c# that listens for specific keypresses on the keyboard and executes code afterwards. Everything works fine as long as the program is the active program.

But I want the program to run also when I "tabbed" out of it.

In other words: When I'm playing a computer game and I press F1, I want the code of my program to be executed.

Is there an easy way to implement it? Is it even possible with console applications?

Thanks in advance :)

0 Answers
Related