fixed ghostkey detection
This commit is contained in:
@ -37,8 +37,6 @@
|
||||
#define LEDNUM PIND3 ///< address of the num-lock LED
|
||||
#define LEDCAPS PIND6 ///< address of the caps-lock LED
|
||||
#define LEDSCROLL PIND7 ///< address of the scroll-lock LED
|
||||
#define LEDBACK1 PIND4 ///< address of the first backlight LED
|
||||
#define LEDBACK2 PIND5 ///< address of the second backlight LED
|
||||
|
||||
uint8_t curmatrix[16]; ///< contains current state of the keyboard
|
||||
uint8_t oldmatrix[16]; ///< contains old state of the keyboard
|
||||
@ -272,7 +270,7 @@ uint8_t scankeys(uint8_t* reportBuffer, uint8_t* oldReportBuffer, uint8_t sizeOf
|
||||
if (data & (1 << col)) {
|
||||
key = pgm_read_byte(&keymatrix[row][col]);
|
||||
modifier = pgm_read_byte(&modmatrix[row][col]);
|
||||
isghostkey = ghostmatrix[row] & (1 << col);
|
||||
isghostkey = (ghostmatrix[row] & (1 << col)) != 0;
|
||||
} else {
|
||||
key = KEY_Reserved;
|
||||
modifier = MOD_NONE;
|
||||
|
Reference in New Issue
Block a user