Mouse/Keyboard monitor

To get the actual key:
SetWindowsHookEx , Anti virus will raise flag.
Or
Raw Input API

To get status

GetMouseMovePointsEx