-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
[Core] Process all changed keys in one scan loop, deprecate QMK_KEYS_PER_SCAN
#15292
Conversation
2425087
to
d2e4d49
Compare
d641f87
to
47eaa12
Compare
47eaa12
to
41c8ba5
Compare
This should really be tackled in its own PR. |
Doesn't appear to break anything, at the very least. been running it for a full day now, and appears to work fine. |
41c8ba5
to
0bfe966
Compare
0bfe966
to
2ce68ed
Compare
2ce68ed
to
a60e4a8
Compare
Thank you for your contribution! |
Deferred to Q3 cycle due to conflicts. |
@KarlK90 , is this PR still alive? |
@ecerulm currently on hold until the rp2040 support is finished |
70373ec
to
9f6e170
Compare
QMK_KEYS_PER_SCAN
2c9c44d
to
5792aee
Compare
...as this will become the default behaviour for matrix scanning and processing code.
Which is mostly what QMK_KEYS_PER_SCAN did without a limit on how many keys shall be processed.
5792aee
to
480d502
Compare
Thanks for the merge; does QMK now send multiple keys in one report? or is that waiting for #12686? |
No QMK still only sends one key change per report. |
For Reviewers: The changeset is huge as many keyboards where adjusted in the process.
The important changes to core functionality are in separate and small commits. I have taken great care to not break any existing keyboard, hopefully this was successful.
Description
Short version
keyboard_task()
into seperatematrix_task()
QMK_KEYS_PER_SCAN
(Allow multiple process_record() calls per scan #2022) which previously allowed to process more than one key in a single scanMake(will be a separate PR)debounce()
algorithms signal changes in the debounced "cooked" keyboard matrix via a return valueAdd(will be a separate PR)LEGACY_MATRIX_SCAN
bodge and info message for custom matrix scanning implementations that do not signal matrix changesLong version
This PR moves the core matrix processing from
keyboard_task()
into a separatematrix_task()
. Processing all key changes of the matrix is also done in one scan loop if and only if there are key changes to be processed.This lazy evaluation of key changes is done by making thePreviously the processing of more than one key change per scan loop could be enabled by settingdebounce()
algorithms signal changes in the debounced "cooked" keyboard matrix via a return value.QMK_KEYS_PER_SCAN
to a number like 4 or 5 which was introduced in #2022 and I guess as a precaution not enabled for other keyboards.As a temporary bodge custom keyboard matrix implementations get a config flagLEGACY_MATRIX_SCAN
which activates a info message like this:Size impacts
ARM: +220 Bytes
AVR: -154 Bytes
Types of Changes
Issues Fixed or Closed by This PR
QMK_KEYS_PER_SCAN
the default behavior as this benefits some users and won't hurt othersmatrix_scan()
API and use its potential for lazy evaluation of the matrixChecklist