X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fkeyboard.c;h=97a8f1cd8c4e2f88086cbaab490a51b58ecd5cc9;hb=5987f67989c1b8f5fbd108d4dae21a227bc2f99c;hp=eac1f1dd81d2475245cff2c16ef9d0629c439588;hpb=d0ee5292b6ea7593ac4e2248deb33103e9936887;p=qmk_firmware.git diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index eac1f1dd8..97a8f1cd8 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -61,23 +61,51 @@ along with this program. If not, see . # include "visualizer/visualizer.h" #endif +#ifdef MATRIX_HAS_GHOST +extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; +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 (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1<