Possible Python Automation With This Particular Material
I would use two UV maps for each key. One is shared between all keys and maps to the key texture without letter. The second is a different UV map for each object, with one big texture containing all the key letters; having a different UV map for each key, each gets their own letter. No need to worry about the material itself then.

You can even use the UV Project modifier to project the letters on each object; no need to manually make all those UV maps.