How to read arrow keys on really old bash?

I would like to get a script to respond to arrow key presses to scroll up and down a menu.

The platform is CDLinux which uses a prehistoric version of bash, version 1.14.7.

I would like to do something like "read -sn 1 keyin" but the "read" command is so primative that it only has the -r switch available so it is not possible, as far as I can see, to read single keystrokes, only whole lines.

Is there any way to detect arrow keys in this backwater of a bash shell?

OK. Found out how to do it.

stty_state=`stty -g`
stty raw; stty -echo
keycode=`dd bs=1 count=1 2>/dev/null`
stty "$stty_state"

Where keycode contains the key code.