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

AnalogueKeyboard: support reports interleaving with other apps #146

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

Azarattum
Copy link
Contributor

When using AnalogSense with any app that interacts with your keyboard at the same time, an app that was using the universal-analog-plugin crashes. This is especially true with any RGB software where you would ideally want to control the lighting of your keyboard at the same time when you play an analog-enabled game.

To solve this problem, we should only consider receiving reports that are actually meant for us (while skipping everything else). Since every report in QMK mirrors its command id and value id, we can you that info to determine which of the received reports is really answering our request.

I've tested on Lemokey P1 HE in cyberpunk and midi app. This approach works reliably and doesn't add any delay. We could probably use safeReceiveReport in other places for other keyboards, but I don't have the devices to test them, so I decided not to change anything there.

Here is a compiled version to test it out: universal-analog-plugin.zip

@Sainan Sainan merged commit a93c94c into calamity-inc:senpai Mar 25, 2025
1 check passed
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.

2 participants