The keypad on the PCA20023 board has 39 buttons.
The keyboard matrix is five rows by eight columns, providing 40 available buttons for firmware. Thirty-nine are used by the keypad with one unused. The matrix is connected directly to the nRF52 SoC on the board.