我可以使用Python捕获OSX中的键盘和鼠标事件吗? [英] Can I use Python to capture keyboard and mouse events in OSX?

查看:70
本文介绍了我可以使用Python捕获OSX中的键盘和鼠标事件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为OSX用Python编写一个简单的宏记录器-当脚本在后台运行时可以捕获鼠标和按键事件并重播它们.对于后者,我可以使用 autopy ,对于前者,是否有类似的简单库?

I'm trying to write a simple macro recorder in Python for OSX - something which can capture mouse and key events as the script runs in the background and replay them. I can use autopy for the latter, is there a similarly simple library for the former?

推荐答案

在OSX上的Python中似乎没有办法做到这一点.

There doesn't seem to be a way of doing this in Python on OSX.

这篇关于我可以使用Python捕获OSX中的键盘和鼠标事件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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