key2=P2&0x3f;
if(key2==0x3f)
{
P3=0xfd;
key2=P2&0x3f;
if(key2==0x3f)
{
P3=0xfb;
key2=P2&0x3f;
if(key2==0x3f)
{
// P3=0xf7;
key2=P2&0x3f;
switch(key2)
{
case 0x3e:key=19;break;
case 0x3d:key=20;break;
case 0x3b:key=21;break;
case 0x37:key=22;break;
case 0x2f:key=23;break;
case 0x1f:key=24;break;
default:key=28;
}
}
switch(key2)
{
case 0x3e:key=13;break;
case 0x3d:key=14;break;
case 0x3b:key=15;break;
case 0x37:key=16;break;
case 0x2f:key=17;break;
case 0x1f:key=18;break;
default:key=27;
}
}
switch(key2)
{
case 0x3e:key=7;break;
case 0x3d:key=8;break;
case 0x3b:key=9;break;
case 0x37:key=10;break;
case 0x2f:key=11;break;
case 0x1f:key=12;break;
default:key=26;
}
}
switch(key2)
{
case 0x3e:key=1;break;
case 0x3d:key=2;break;
case 0x3b:key=3;break;
case 0x37:key=4;break;
case 0x2f:key=5;break;
case 0x1f:key=6;break;
default:key=25;
}
}
return(key);
}
}