[EDIT 3] I kind of "solved it" by at using the "strange" version. At least for the most important keys. It is suffient for my case, where I want to check
normally I would use an event
You should still be using an event, preferably KeyDown since you don't mind what key is pressed, if you are programming on windows. If not, you could use something like Console.ReadLine();.
edit: If you are looking for something like
if (Keyboard.IsKeyDown(Key.AnyKey)) return true;
then you must be joking...
edit 2: Well, the approach of your logger is interesting, but I think that you are reinventing the wheel. All programming languages provides some way to handle wich key was pressed, when this can be known. In C# for Windows, this is done using events. Besides, I think you won't be able to handle this kind of things by yourself in .NET, since you need to access some system functions from the Win32 API, and AFAIK you aren't allowed to do this (at least easily...) in managed code. Some solution would be to create a HOOK and send messages from there to your application, but I don't know how to do this in C#. This was the way in Delphi, where I have more experience.