This is a fairly easy job for a Cypress PSOC as it has the ability
to route on chip and handle both analog and digital signals.
I assume you have to supply power to keyboard, and that is just
a few mA, easy for a UP to supply from a digital pin. If keyboard
also has LEDs then power will be too much and have to be handled
with external MOSFET high side switch. Or possibly use multiple
pins paralled to supply power, check specs both keyboard and
the processor you use to control all this.
So what you have remaining are just normal digital I/O to mux, use
mux/demux logic parts for that.
Regards, Dana.