Energy spectra of electrons arising from heavy-particle collisions in the keV region