I am trying to create a small C# program using Visual Studio that simulates "Autofire" or "continuous clicking" for Afk monster-grinding on my Minecraft server.
The program works, or works when the program is in "foreground". I can start and stop the thread that handles the auto-clicking with a chosen button combination(Ctrl+Alt+Z).
But when the program is in the background(and the game in the foreground)i cannot start/stop the auto-clicking. The program simply do not register the button combination.
How do make the program register the button combination while it is in the background?