I would like to write a Java application that counts how long I have been using a keyboard or mouse without interruption. Are there any built-in classes or third-party libraries that can define a global keyboard / mouse?
It can only be using the window hook function using JNI. Someone has already posted the code here.
EDIT: this is better, as are mouse events
Collecting files for rawinputsharp and an accompanying article may be helpful. This is not specific to Java, but I hope you can adapt it for the better.
Source: https://habr.com/ru/post/1730229/More articles:Need a simple regex for LaTeX - regexThe easiest way to upload a document to sharepoint using web services is c #BIND ERROR: address already in use - unixDo iphone apps in development slower than when they are released? - performanceWhat causes segmentation error errors in this C code? - c ++Does SQL take into account many-to-many values ββor is it counted every time a new line is added? - sqljQuery - dynamic copyright year - jqueryHaskell Sort Function - sortingexec.Run and argv - go problemExtracting data from XML in a Sql server column - xmlAll Articles