- // Ghost occurs when the row shares column line with other row, blanks in the matrix don't matter
- // If there are more than two real keys pressed and they match another row's real keys, the row will be ignored.
+ rowdata = get_real_keys(row, rowdata);
+ if ((popcount_more_than_one(rowdata)) == 0){
+ return false;
+ }
+ /* Ghost occurs when the row shares a column line with other row,
+ and two columns are read on each row. Blanks in the matrix don't matter,
+ so they are filtered out.
+ If there are two or more real keys pressed and they match columns with
+ at least two of another row's real keys, the row will be ignored. Keep in mind,
+ we are checking one row at a time, not all of them at once.
+ */