How to get keyboard and mouse raw data on python with os and file opening only on MacOS and Linux - Stack Overflow

I am making a program that gets low level data from the operating system in Python. But the 2 that I ca

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!

Share Improve this question edited Feb 21 at 5:27 Borne asked Feb 21 at 4:44 BorneBorne 116 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

For 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 :)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745167033a4614693.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信