With the following RegisterHotKey
function, I can globally hook normal key-modifier combinations:
[DllImport("user32.dll")]
private static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);
Great article about it and full source code here: http://www.liensberger.it/web/blog/?p=207
But the question is, how do I hook Media Keys, those play/pause/next/previous -keys found in keyboards and pc remotes? I have googled and googled, but without any luck.