Streamline identifier parse logic, ensure case is consistent across browsers, use keyIdentifier if it exists and a corresponding keypress is unlikely.