I want to be able to read keypress events from a bash script. I know I can read /dev/input/eventX but it gives me a ton of gibberish. I just want to be able to read simple keystrokes, all of which will be numeric. I am trying to use this for a headless remote control system. I have tried with evtest which is better than the raw data, but still will take tons of parsing. I am thinking a keylogger would work, but I bet there is a better solution.

Basically I want to wait until a number and a linefeed are entered and then do a command. No one will be logged in, so it has to be read from raw input I assume.

Any ideas?

Thanks,

Jeremy
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to