Checking key pressed

Hi, I'm using Win32 API making a desktop gadget.
This gadget can work in the background.
When it is working in the background, it has an idle timer.
I wish to reset this idle timer when user pressed a key or moved a mouse.

For mouse, I used GetCursorPos to check if mouse moved, and it work properly.
However, I don't know how to check if a key on keyboard is pressed.
The problem is, when gadget is in background, it is not focus.
So I can't use message to get key input. I Google search around and it seems that hooking the keyboard is the only way. But I don't really want to do that.

Is there any other way checking if a key was pressed when the window is not in focus? Something similar to GetCursorPos.
GetASyncKeyState

Although it only lets you check one key at a time.
Topic archived. No new replies allowed.