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 foreground. How would one do this, I know this is possible as i.e. Songbird can do this.
This keyboard shortcuts would be of the form ctrl+->
I so far don’t have any code as I don’t even have the slightest idea on how to register keyboard shortcuts globally.
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.