Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pyautogui #35

Merged
merged 32 commits into from
May 8, 2020
Merged

Switch to pyautogui #35

merged 32 commits into from
May 8, 2020

Conversation

duncte123
Copy link
Collaborator

@duncte123 duncte123 commented Mar 12, 2020

Fixes #34

@duncte123 duncte123 self-assigned this Mar 12, 2020
@duncte123
Copy link
Collaborator Author

Current findings on ubuntu 18.04:
pynput throws with releasing media keys in gnome
pyautogui silently fails

@duncte123 duncte123 changed the title [WIP] Switch to pyautogui Remove keyboard library Mar 13, 2020
@duncte123 duncte123 requested a review from nimaid March 13, 2020 15:59
@duncte123 duncte123 marked this pull request as ready for review March 13, 2020 15:59
@duncte123 duncte123 mentioned this pull request Mar 13, 2020
@duncte123 duncte123 changed the title Remove keyboard library Switch to a different keyboard library Mar 27, 2020
@duncte123 duncte123 changed the title Switch to a different keyboard library Switch to pyautogui Mar 27, 2020
@duncte123
Copy link
Collaborator Author

This needs a lot of testing but it should work

@duncte123
Copy link
Collaborator Author

This PR is confirmed to be working with the MK3 as well

@duncte123
Copy link
Collaborator Author

duncte123 commented Apr 7, 2020

Currently doesn't work with the following games:

  • factorio: both windowed and full screen
  • Minecraft (windows 10): both windowed and full screen

Tested and working with these games:

  • csgo
  • Minecraft (Linux)

@NullMember
Copy link
Contributor

If you're switching to pyautogui, keyboard events on win32 directinput driven applications will not respond keyboard events. You can write your own keyboard library using win32 api calls or (I recommend) just continue to use keyboard library for windows platform only (or add a new keywords like "@GAMe" or something to use keyboard library calls on windows for not working games and applications). If you're going to write new keyboard library using win32 calls I can help.
Just a little background:
(unfortunately for me) I already wrote a few lines of code to my local LPHK build. I play age of empires 3 with my friends and LPHK not worked for it. I thought it was directinput issue. Instead of trying something else I wrote new keyboard library from scratch and it's not worked too sigh. Later I found it's not working because game running on admin rights shame. I've used pywin32 (adds new dependency) to use win32 api calls but it's possible to use just built-in ctypes (no dependency).

@duncte123
Copy link
Collaborator Author

If you're switching to pyautogui, keyboard events on win32 directinput driven applications will not respond keyboard events. You can write your own keyboard library using win32 api calls or (I recommend) just continue to use keyboard library for windows platform only (or add a new keywords like "@GAMe" or something to use keyboard library calls on windows for not working games and applications). If you're going to write new keyboard library using win32 calls I can help.
Just a little background:
(unfortunately for me) I already wrote a few lines of code to my local LPHK build. I play age of empires 3 with my friends and LPHK not worked for it. I thought it was directinput issue. Instead of trying something else I wrote new keyboard library from scratch and it's not worked too sigh. Later I found it's not working because game running on admin rights shame. I've used pywin32 (adds new dependency) to use win32 api calls but it's possible to use just built-in ctypes (no dependency).

We recently found this out ourselves and are trying to find a good solution.
I saw your PR (#38) earlier today and I'm going to test and merge it soon.
You're welcome to implement a fix for win32 as a PR to this branch we just have to make sure to also support macOS and GNU/Linux.

@duncte123 duncte123 merged commit 562fe7f into master May 8, 2020
@duncte123 duncte123 deleted the pyautogui branch May 8, 2020 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Anything but keybinds broken when running as root on ubuntu
3 participants