glutKeyboardFunc problem

Im making a football game which kicks a football against a wall on a gluPerspective view

How would I do a code so that if I press:

  • left key - the ball will aim left but doesn’t shoot
  • right key - the ball will aim right but doesn’t shoot
  • up key - the ball will aim upwards but doesn’t shoot
  • down key - the ball will aim down but doesn’t shoot

z key - shoots the ball against the wall