Cross sections have been measured for $K\ensuremath{\alpha}$ x-ray production in targets of Al, Ti, Cu, Zr, Ag, Sm, and Ta by Ar, Kr, and Xe ions ranging in energy from $2.5\phantom{\rule{0.3em}{0ex}}\text{to}\phantom{\rule{0.3em}{0ex}}25\phantom{\rule{0.3em}{0ex}}\mathrm{MeV}∕\mathrm{amu}$. In addition, the degree of simultaneous $L$-shell ionization and the enhancement of the $K\ensuremath{\alpha}$ diagram lines due to secondary ionization processes were assessed by performing high-resolution spectral measurements on Al, Ti, V, Co, and Cu targets. This information was used to correct for the $K\ensuremath{\alpha}$ x-ray yield produced by electron bombardment and photoionization, and to calculate the fluorescence yields needed to convert the $K\ensuremath{\alpha}$ x-ray production cross sections into $K$-vacancy production cross sections. The resulting cross sections were compared with the predictions of the perturbed stationary state approximation with corrections for projectile energy loss, Coulomb deflection, and relativistic effects (ECPSSR theory). Also, the scaling properties of the $K\ensuremath{\alpha}$ x-ray production cross sections were examined and a semiempirical (universal) curve was deduced that reproduces the measured cross sections to within $\ifmmode\pm\else\textpm\fi{}30%$ on average.