keystates global; main input header