movement animation; necessary funncions for pressed key movement