Key events code altered