Added check key pressed