Java中的全局键盘记录器 [英] Global keylogger in Java

查看:342
本文介绍了Java中的全局键盘记录器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个监控此人的鼠标和键盘的应用程序。如果他们没有使用键盘或鼠标1分钟,它会弹出一条消息你没有使用鼠标或键盘1分钟和一个OK按钮。

I'm writing an application that monitors the person’s mouse and keyboard. If they have not used the keyboard or mouse for 1 minute, it will pop up a message that says "You have not used the mouse or keyboard for 1 minute" along with an OK button.

如何在Java中执行此操作?

How do I do this in Java?

推荐答案

您需要一些C / C ++代码并调用< a href =https://msdn.microsoft.com/en-us/library/ms644990%28VS.85%29.aspx =nofollow noreferrer> SetWindowsHookEx 此功能允许您挂钩Windows事件并接收副本。

You need a bit of C/C++ code and call SetWindowsHookEx This function allows you to hook into Windows events and receive a copy.

此问题包含帮助您入门的代码: Windows中的JNA键盘挂钩

This question contains code to get you started: JNA Keyboard Hook in Windows

这篇关于Java中的全局键盘记录器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆