pitchkeys = dict(zip([sk.Z, sk.X, sk.C, sk.V, sk.B, sk.N, sk.M, sk.P, sk.COMMA], keys)) 

I believe that should be sk.PERIOD, not sk.P, otherwise this is nice.