开发者

Java keyboard hook

I would like to write a Java app that counts how long I have been using the keyboard or mouse w/o a break. Are there any built-in classes or 3rd part开发者_运维技巧y libraries that can detect global keyboard/mouse use?


This can only be by using windows's hook function by JNI Someone already posted code here

EDIT: this on is better it also covers mouse events


The collection of files for rawinputsharp and the accompanying article might prove helpful. It's not Java-specific, but hopefully you can adapt it to suit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜