I\'m creating a C# application, could be WinForm, but preferably console application, which needs to capture keyboard shortcuts even when the application is not in the foregroun
You should use RegisterHotkey and not a keyboard hook.
Using a global keyboard hook when you just want a global hotkey is an abuse of the api. It also has negative performance implications since every key needs to be processed by your program before it arrives at the target program.