Added delay to keypress