Making a custom keyboard with arduino?

Using 17 pins, you can use keypad.h library to read a 72 key keypad.
Electrically arranged as 8x9, physically any way you want.
Probably easier to manage fn as seperate key not part of the keypad.
Multi-press, that would be managed in your sketch.
So 17 for matrix, fn key, and 2 pins for serial interface.