   {
     KeyLayer = Lay - 1;
   }
-<<<<<<< HEAD
   //ReleaseAllKey();
-=======
-  ReleaseAllKey();
->>>>>>> refs/remotes/origin/master
 }
 
 

        {
          if (KeyState[j][i] == HIGH)
          {
<<<<<<< HEAD
            LayerState[j][i] = TempLayer;
=======
>>>>>>> refs/remotes/origin/master
            PressKey(GetValEEPROM(j, i, TempLayer), GetTypeEEPROM(j, i, TempLayer));
          }
          else
          {
<<<<<<< HEAD
            ReleaseKey(GetValEEPROM(j, i, LayerState[j][i]), GetTypeEEPROM(j, i, LayerState[j][i]));
=======
            ReleaseKey(GetValEEPROM(j, i, TempLayer), GetTypeEEPROM(j, i, TempLayer));
>>>>>>> refs/remotes/origin/master
          }
        }


    else if (type == 1)
    {
      TempLayer = KeyLayer;
      //ReleaseAllKey();
    }
    else if (type == 2) //DEPRECIATED
    {
