RP2040 + Keyboard matrix wiring and logic [Help]

Just an idea for the keyboard. Since you will be using your own code, you might want to consider using some IR remote control for the keyboard. You will have ready-made buttons and a working board that uses the same power supply as the RP2040 and you can choose how many buttons you need, as only 1 pin is needed for connection instead of the IR emitting LED. A few years ago I wrote in a topic in this forum and then I had done a test with an Arduino Nano and some old remote control as software I filtered the modulating frequency of 38kHz.