Attach keydown event to document instead of "*"