Removing unneeded check on keydown event