I知 doing now a program which measures user activity. That program is in background, but it should be able to tell if user is doing something on computer or not. Now I知 able to detect only mouse movements (by getting each second mouse X and Y and comparing them to precedent values) but how can I see if user is using only keyboard in other programs? Is there a way to do it in Java?