Skip to content

Commit

Permalink
Fix MATRIX_HAS_GHOST when MATRIX_COL > 16 (qmk#20093)
Browse files Browse the repository at this point in the history
  • Loading branch information
cberner authored and rodrigob committed May 2, 2023
1 parent 4539b2f commit 3c3e254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quantum/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata) {
matrix_row_t out = 0;
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
// read each key in the row data and check if the keymap defines it as a real key
if (keycode_at_keymap_location(0, row, col) && (rowdata & (1 << col))) {
if (keycode_at_keymap_location(0, row, col) && (rowdata & (((matrix_row_t)1) << col))) {
// this creates new row data, if a key is defined in the keymap, it will be set here
out |= 1 << col;
out |= ((matrix_row_t)1) << col;
}
}
return out;
Expand Down

0 comments on commit 3c3e254

Please sign in to comment.