How to detect input when game is minimized

I want develop a game which can make players control the character even when game window is minimized, but I can not find the way to do it.HELP!!