I have written a screen saver for my Media Centre PC (which runs Windows 8.1). It is a simple Windows Forms app which displays all the pictures in my Pictures folder randomly, captioning each picture with the folder, filename, date taken, etc. It handles the Click, MouseMove and KeyDown events, terminating if any is received.
It works fine, except that, if I press some of the keys on my Media Centre remote (like the one that displays all my recordings), the screen saver doesn't terminate. It is as if these keys don't generate a KeyDown event.
I tried putting a global keyboard hook in, but it doesn't seem to be called - I have a vague memory that these are not allowed in later versions of Windows.
Any suggestions on how I can detect all the keys on my media centre remote from my C# Windows Forms app?
The source code is on github