Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as off topic by slhck Apr 1 '13 at 9:30

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Could you perhaps be more explicit about what exactly you need to do? Why would you need to be able to read all characters with Bash? – slhck Mar 31 '13 at 17:03
@slhck I want to make a completely bash app to monitor different network nodes with arrow keys, tab, and esc. I suppose I could do it in c++ but I want to try it in bash. – Blue Ice Mar 31 '13 at 19:19
Ahaaa.. Then I guess you need something like dialog. You could start by checking this link on stack overflow: – Radoo Mar 31 '13 at 21:38
@Radoo Perfect. How do I make this question answered now? – Blue Ice Mar 31 '13 at 21:43
Just leave it opened. :) I don't mind. You're question correlates with other questions that were already answered on StackExchange sites. I guess a mod can close it, if you got your answer from my link. – Radoo Mar 31 '13 at 21:46