I need to be able to read every key that can be pressed with bash. This includes the arrow keys, esc, and the function keys. The command "read" is not going to work because some characters are more bytes than others, and it is a very ugly way to read non-character keys.
I am looking for a builtin solution that will work on all UNIX platforms (at least Mac and Linux).
It probably would return a number instead of an escape code for every character.