如何在Python上制作按钮按钮

发布于 2025-02-13 11:40:46 字数 57 浏览 1 评论 0原文

我有一个问题,是否可以使用Python进行操作,以便按下右键按钮时,按下键盘上的一些键(例如,G键)

I have a question, is it possible to use python to make it so that when pressing the right mouse button, some key on the keyboard is pressed (for example, the G key)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太傻旳人生 2025-02-20 11:40:46

不确定这是否是提出此问题的最佳地点,但我会回答并发生任何事情。

根据我的经验,我认为Boppreh的最简单,最容易访问的键盘控制模块是“键盘”。我使用过它,没有问题。如果这是一个考虑因素,则适用于Windows和Linux的良好跨平台选择。

这是一些资源。应该很容易整合。

下次,一个友好的建议,朋友。请先尝试在线查找。快乐的编码:)

https://pypi.org/prognt/project/keyboard/keyboard/

https://github.com/boppreh/keyboard

Not sure if this is the best place to ask such question but I'll answer and whatever happens to the thread happens.

From my experience, I think the easiest and most accessible module for keyboard control would be 'keyboard' by BoppreH. I've used it and had no issues. Good cross-platform choice for Windows and Linux, if that's a consideration.

Here are a couple of resources. Should be easy enough to integrate.

A friendly suggestion for next time, friend. Please try looking online first. Happy Coding :)

https://pypi.org/project/keyboard/

https://github.com/boppreh/keyboard

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文