A mechanical keyboard is going to require a few more pins and probably some sort of matrix scanner. But the grid controller is less clear. Maybe external I/O expanders or a even bigger matrix?
The world of custom keyboards has over the years developed its work into an art form, as mechanical key switches meet USB ... from elsewhere and adapting its matrix to suit whatever controller ...