Merge "Cleanup flag "do_not_reset_key_event_state"" into main