Arduino Keyboard polyphony help

I did everything as arrays:

byte keyArray[]={
  2,3,30,8,9,31,4,5,6,7,10,11,12,13,}; //Ports D2,D3,D4,D5,D6,D7,B0,B1,B2,B3,B4,B5,B6, added b7 - notes 48, 47,46,45,44,43,42,41,40,39,38,37,36
byte outputArray[] = {
  14,15,16,17,18,19,22,23,24,25,26,27,28, 21,22,29}; // Ports A0,A1,A2,A3,A4,A5,C0,C1,C2,C3,C4,C5,C6, added a6, a7, c7

If you want to use an Uno with 5 outputs and use Keypad.h to determine the key(s) that are pressed instead of discrete pins, shouldn't be difficult to swap that in.