sbit key0 = P1^1;
sbit key1 = P1^2;
//more keys here as needed
#define MaxKey  N  // number of keys used