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
One possible approach would be to use Windows Hooks.
But in order to do that you would need to create a native DLL, and in it write your callback function to install as a hook.
Lookup SetWindowsHookEx for a starting point. There are also lots of online samples on how to use it.