fixed keyboard tracking events after losing focus