from what I'm reading you want to put certain chords under certain keys on your keyboard, even if the root noot of the chord isn't the key you're playing.
then this should enable to you create a chord for each key. Note though, that this will be the midi-number of the notes you play, going from 0 to 99 in this case (that's the range set to these int-controls in the code), so 64 would be E4 like the normal pitch knob. Of course, you can also change these to the normal pitch-knobs to have an easier way of reading out the notes of the chord, but you'll have to edit this yourself in the code. Anyway, it would function the same as what I'm showing here:
keyboard to chord demo.axp (25.1 KB)
for set more notes in a chord, you could add more rows. To set the amount of notes in a chord, you can add one more row again and use comparators and a logic-AND on the gate to set which midi-outs may actually respond (if the row-number is below the amount of notes in the chord, use it)