admin管理员组文章数量:1415099
I am making a program that gets low level data from the operating system in Python. But the 2 that I can't really get are: keyboard and mouse. On Linux, mouse is fine, its just this file: /dev/input/mice
but on MacOS I heard that I need to learn PyObjC to get mouse data. Is that true? And the only file I could find that had keyboard data is: /dev/tty
. Which might not work outside of Terminal. I want to use the smallest amount of modules and would like it to be done with files and os. I am using MacOS right now to code this, so I wont be able to check code that is not suitable for both. Thanks!
I am making a program that gets low level data from the operating system in Python. But the 2 that I can't really get are: keyboard and mouse. On Linux, mouse is fine, its just this file: /dev/input/mice
but on MacOS I heard that I need to learn PyObjC to get mouse data. Is that true? And the only file I could find that had keyboard data is: /dev/tty
. Which might not work outside of Terminal. I want to use the smallest amount of modules and would like it to be done with files and os. I am using MacOS right now to code this, so I wont be able to check code that is not suitable for both. Thanks!
1 Answer
Reset to default 0For your information - it's no matter, what laptop / device you using while you try to learn - try to install git-app for an a mac os and ZSH-terminal for an understanding more information + if you need how_to code in a MacOs - install DevTools for an Apple and earn a code from an Apple for your app :)
2nd moment - try to install vm-software :)
Starter pack in Python is just an a software-orienthed method for a development :)
本文标签:
版权声明:本文标题:How to get keyboard and mouse raw data on python with os and file opening only on MacOS and Linux - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745167033a2645743.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论