Hello, I'm working on a school project and I've ran into a wall here, what I need to do is an application that runs and listens for a certain key, I can get this working while it's focused but when minimized it just doesn't work, I've tried several approaches to this but I can't find a solution.

Anyone have experience with this or can push me in the right direction?
Thanks in advance,
Rolf.