Added press key method.