Skip to content

Apple Silicon M2 Fixes#541

Closed
zmz223 wants to merge 9 commits intomoses-palmer:masterfrom
zmz223:master
Closed

Apple Silicon M2 Fixes#541
zmz223 wants to merge 9 commits intomoses-palmer:masterfrom
zmz223:master

Conversation

@zmz223
Copy link
Copy Markdown
Contributor

@zmz223 zmz223 commented Feb 20, 2023

Combines #512 and re-reverts the changes made to darwin in PR #411 so that two listeners can run simultaneously on a mac with apple silicon.

@moses-palmer
Copy link
Copy Markdown
Owner

moses-palmer commented Jun 7, 2023

Thank you for your contribution, and I am sorry for this very long delay in feedback!

I no longer have access to any Apple hardware, so I have not been able to test pynput on macOS in quite a while. The lazy imports do seem to still be an issue, even though this was reportedly fixed in objc 8.0, so I see no reason not to merge those parts of the PR.

I am a bit curious, however, about 52b4e65b2570387b89aac2ca0d6536d5fd4f9bbc: to me it does not seem to do anything that
relates to the M2 chip.

@zmz223
Copy link
Copy Markdown
Contributor Author

zmz223 commented Jun 16, 2023

Hi Moses,
Thanks so much for your response! I updated the PR to account for lazy imports in the Darwin mouse class which also are causing the same lazy import errors as in the keyboard. With regard to the Mac M2 issue, a race condition seems to be occurring in how threads are handled between UI libraries like PyQT and Tkinter and how pynput handles threading. I've tested the same application on a Mac with an Intel processor and the issue does not occur

Zach Zaiman and others added 4 commits June 16, 2023 09:47
…n addition to WM_INPUTLANGCHANGE since some applications (e.g., Remote Desktop software) may choose not propagate WM_INPUTLANGCHANGE to the hooks when the input language is changed.
yield value
finally:
CFRelease(wrapped_value)
CFRelease(wrapped_value)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this double release intentional?

@zmz223 zmz223 closed this by deleting the head repository Dec 14, 2024
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.

4 participants