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

Add keyIsInjected helper #1082

Merged
merged 1 commit into from
Sep 3, 2021
Merged

Add keyIsInjected helper #1082

merged 1 commit into from
Sep 3, 2021

Conversation

The-Compiler
Copy link
Contributor

So that the bits don't have to be masked and checked manually, like with the other helpers. This avoids mistakes like in #1076 (will add a review comment with details shortly).

I was unable to run the tests locally due to #1081, so I'll rely on the CI instead and hope I didn't mess something up. Refactorings were done via:

git ls-files | xargs sed -i 's/(event\.state \& INJECTED) != 0/keyIsInjected(event.state)/g'
git ls-files | xargs sed -i 's/(event\.state \& INJECTED) == 0/!keyIsInjected(event.state)/g'  
git ls-files | xargs sed -i 's/(event\.state \& INJECTED)/(keyIsInjected(event.state))/g'   

So that the bits don't have to be masked and checked manually, like with the other helpers.

Signed-off-by: Florian Bruhin <me@the-compiler.org>
@obra obra merged commit e56e4e4 into keyboardio:master Sep 3, 2021
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