acidcoke / Grimassist

Control your computer by making faces
Apache License 2.0
3 stars 1 forks source link

Support Linux and Mac #10

Open acidcoke opened 8 months ago

acidcoke commented 8 months ago

@willwade I found this video by the creator of Pydirectinput where he explains the insufficiencies of pyautogui. In windows some games don't accept keystrokes from Pyautogui since they are Virtual Keycodes. Pydirectinput uses Scancodes to avoid this issue.

To enable support for Mac and Linux, I would simply check if we are on win32 and only then use Pydirectinput for the keyboard. Otherwise we use pyautogui

willwade commented 8 months ago

Aha. Well that makes sense and I agree with the simple solution of if win

Thanks for clearing that up for me.

acidcoke commented 8 months ago

Also the win32api is used once in the keybinder.py to get all monitors. So far I found screeninfo but even though the repo looks pretty much dead, it'll maybe suffice.