Is there any way to detect a keypress when your window is not active?

I got a transparant window which is always visible ontop of other applications.
Though the idea is to start timers when the assigned key is pressed.
The problem i got is when the window is on top of the application its visible but not active.
And so it will not detect when a key is pressed that is assigned to the timer.

Can anybody explain me what the best option would be to get this done?


Use a keyboard hook. Click Here for an article about mouse hooks and keyboard hooks.

Alright going to look into that again.
Had seen it before, but had trouble getting it to work in wpf.

Managed to get it working, thanks for the help.