You can use Bash to read individual keypresses. Here is an example:
# Reset terminal to current state when we exit.
trap "stty $(stty -g)" EXIT
# Disable echo and special characters, set input timeout to 0.2 seconds.
stty -echo -icanon time 2 || exit $?
# String containing all keypresses.
# Set field separator to BEL (should not occur in keypresses)