Capturing key strokes

I have a shell script and i want to capture the key strokes in that script while that script is in running state.
For example During the running of the process , if i press CTRL+Z i need to capture those key strokes in that script.
Any idea pls.

Regards,
ORK

trap is basicly what u are looking for. but imho you cannot trap a control-z signal

Have a look at 'script'. It may be installed by default; if not, you should be able to acquire it through your package manager.

You can capture any character, including control Z. However you can't capture other keys like "shift". If a user simply taps the "shift" key, say, 3 times. nothing is sent to the system. For an example of capturing characters, see: Reading password and echo * character