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

Remove now-obsolete idle checks from a few plugins #437

Merged
merged 1 commit into from Oct 20, 2018

Conversation

algernon
Copy link
Contributor

A long-long time ago, Kaleidoscope used to call onKeyswitchEvent (or rather, it's then-current incarnation) even when keys were idle. For a number of plugins, this was a case they didn't want to handle, and bailed out early.

When we changed Kaleidoscope to not call the event handlers for idle keys, these plugins weren't modified at the same time, and the superfluous check remained, making the firmware both larger and marginally slower.

Since the event handlers are never called when idle, it is safe to remove these checks.

Affected plugins are Leader, OneShot, and TapDance.

A long-long time ago, Kaleidoscope used to call `onKeyswitchEvent` (or rather,
it's then-current incarnation) even when keys were idle. For a number of
plugins, this was a case they didn't want to handle, and bailed out early.

When we changed Kaleidoscope to not call the event handlers for idle keys, these
plugins weren't modified at the same time, and the superfluous check remained,
making the firmware both larger and marginally slower.

Since the event handlers are never called when idle, it is safe to remove these
checks.

Affected plugins are `Leader`, `OneShot`, and `TapDance`.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
@algernon algernon added enhancement New feature or request pending labels Oct 20, 2018
@algernon algernon requested a review from obra October 20, 2018 14:24
@algernon
Copy link
Contributor Author

This shaves 100(!) bytes off of my own sketch.

@obra obra merged commit 758cf33 into master Oct 20, 2018
@algernon algernon deleted the various/idle-check-removal branch October 21, 2018 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants