have a look at inkey in the manual