fix keyboard event not firing error