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

Regression: Previously, action_exec(TICK) was only called if no keys … #521

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tmk_core/common/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void keyboard_task(void)
matrix_row_t matrix_change = 0;

matrix_scan();
bool key_changed = false;
for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
matrix_row = matrix_get_row(r);
matrix_change = matrix_row ^ matrix_prev[r];
Expand Down Expand Up @@ -137,7 +138,7 @@ void keyboard_task(void)
hook_matrix_change(e);
// record a processed key
matrix_prev[r] ^= ((matrix_row_t)1<<c);

key_changed = true;
// This can miss stroke when scan matrix takes long like Topre
// process a key per task call
//goto MATRIX_LOOP_END;
Expand All @@ -146,7 +147,9 @@ void keyboard_task(void)
}
}
// call with pseudo tick event when no real key event.
action_exec(TICK);
if (!key_changed) {
action_exec(TICK);
}

//MATRIX_LOOP_END:

Expand Down