How to log keystrokes through windows service

Can anyone explain me how to log keystrokes through windows service in Visual Studio 2005?