From 25c6ca750fc74376a2bea7612c0e05401d3ecf5e Mon Sep 17 00:00:00 2001 From: Jeremiah Date: Sun, 14 May 2017 15:36:44 -0700 Subject: [PATCH] added comments and made function name clearer --- tmk_core/common/keyboard.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index a3fe559f3..97a8f1cd8 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -61,39 +61,45 @@ 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 (int col = 0; col < MATRIX_COLS; col++) { + 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<