Set user active or idle based on last input on keyboard.
Make timeout customizable, and possible to disable completely by the user
http://joelabrahamsson.com/detecting-mouse-and-keyboard-input-with-net/
[DllImport("User32.dll")]
private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);
[StructLayout(LayoutKind.Sequential)]
internal struct LASTINPUTINFO
{
public uint cbSize;
public uint dwTime;
}
Set user active or idle based on last input on keyboard.
Make timeout customizable, and possible to disable completely by the user
http://joelabrahamsson.com/detecting-mouse-and-keyboard-input-with-net/