Change method of keypress registration and added all directions