The processes electron-stimulated desorption (ESD) K atoms during the formation of 2D layers of the intermetallic compounds KxAuy on the gold surface at room temperature are investigated. The resonance dependence of the ESD yield of K atoms on the energy of exciting electrons is studied. The resonance dependence is due to the excitation of the core levels Au 5p(3/2) (sic) Au 5p(1/2). It is shown that the processes of ESD excitation of K atoms occur at the K/KxAuy interface. Calculation of density of states 2D layers of intermetallic compound KAu showed that they can form semiconducting 2D layers, in contrast to crystals KAu which are metals. The band gap of intermetallic compounds KAu decreases with an increase in the thickness of the 2D layers of intermetallic compounds. The results obtained are explained by the formation of non-metallic islands, from which a 2D layer of the intermetallic compounds KxAuy on the gold surface is subsequently formed.