Really scary keyconfig loading/saving impl