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 autoferrit committed Dec 6, 2023
1 parent 84586c1 commit 26feb9d
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 @@ -189,9 +189,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 26feb9d

Please sign in to comment.