Skip to content

Conversation

adamnemecek
Copy link
Contributor

@adamnemecek adamnemecek commented Apr 5, 2024

Fixes #664. The fix is taken from https://github.com/tinyx3k/goxkey/blob/38f66edeb65e12a496a50fc700c89492b6215c94/src/platform/macos_ext.rs#L196C5-L213C6

This is absolutely necessary to filter events. Looking around github, returning NULL is a very common use case.

@adamnemecek adamnemecek changed the title Fixes #661 Fixes #664 Apr 5, 2024
@mrobinson mrobinson changed the title Fixes #664 Cancel event when CGEventTap callback returns nullptr Apr 8, 2024
@mattjbray
Copy link
Contributor

See also #492

@adamnemecek
Copy link
Contributor Author

I guess that also works. It is disheartening that that PR been open since 2022.

@jrmuizel
Copy link
Collaborator

Is it possible to add a test that shows the problem?

@adamnemecek
Copy link
Contributor Author

The problem is that currently the api does not allow for consuming events.

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.

Incorrect behavior of CGEventTap
3 participants