On 12-09-19 11:51 AM, Jeremy wrote:
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
I have this working perfectly now - code I used is at
http://kohd.ca/2012/09/25/keyboard-c-mpd-carbox/
Partially completed bash script for controlling mpd from the keypresses
is at http://kohd.ca/2012/09/25/mpd-control-raspberry-pi-numerical-keypad/
Thanks for the input!
Jeremy
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca