在Java中的另一个窗口上操作时,如何记录击键? [英] How do you record keystrokes when operating on another window in Java?

查看:92
本文介绍了在Java中的另一个窗口上操作时,如何记录击键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在各种网站的浏览器窗口中时,我正在寻找记录键击和鼠标位置,但我不确定如何在SWING(或其他GUI)窗口之外执行此操作。

I'm looking to record keystrokes and mouse positions while I'm in a browser window on various websites, but I'm not sure how to do this outside the SWING (or some other GUI) window.

当另一个应用程序的窗口是活动窗口时,如何记录击键?

How can I record keystrokes when a different application's window is the one active?

推荐答案

Java不会提供您所需的支持。如果您可以访问X中的RECORD扩展或Windows上的Win32,则执行此操作非常简单。

The support you need is not exposed by Java. It is a fairly simple matter to do this if you have access to the RECORD extension in X, or Win32 on Windows.

这是一个实现对两者的支持的Python项目这些平台: pykeylogger

Here is a Python project that implements support for both of these platforms: pykeylogger.

这篇关于在Java中的另一个窗口上操作时,如何记录击键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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