Thank you so much for helping me through this.
I did exactly what you said, I called the function readKeyboard() on the void loop with a flag and the code started running after that. It shows the numbers one to eight but it keeps printing some stuff on the serial monitor even tough I didn't connect anything.
By the way, thank you for your code it will make me understand the timer interrupt better on the Due.
I attached the up-to-date code if you or anyone wants to take a look at it.
teclado_varredura_8x4_Due.ino (14.9 KB)