according to the code: static uint8_t matrix[MATRIX_ROWS]; #define ROW(code) (code>>3) #define COL(code) (code&0x07) in converter/ps2_usb/matrix.c ROW is decided by bits 7~4 of scancode COL is decided by bits 2~0 of scancode