12-keypad reading with 7 pins, I'm confused

So please tell us what was the most advanced thing that your teacher did explain yet!

This forum works this way:
You start writing a piece of code yourself. If a question arises post the question in combination with your code that you have written so far.

Or in this case you start studying the suggested code yourself. If a question arises post the question and the code.

As an example:
The code at baldengineer starts with

// Keyboard Matrix Tutorial Example
// baldengineer.com
// CC BY-SA 4.0
  
// JP1 is an input
byte rows[] = {2,3,4};
const int rowCount = sizeof(rows)/sizeof(rows[0]);

it might be that you have never seen before a "[ ] = {2,3,4}"
So you simple ask:
"what does this line of code

byte rows[] = {2,3,4};

do?
Can somebody explain it or post a link to an explanation?

You could add some guessing what you assume what it might be:

example: is byte rows some kind of byte-variable?

By posting this way you show that you started thinking / analysing the code yourself.

This makes the big difference compared to a question like
"can somebody post the ready to use code how to scan a keyboard?"

In this way you create a customized tutorial which is specialised to your needs. The open secret is show some own effort in learning.
So give it a try! Post your question! What ever your question might be.
best regards Stefan