-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le 12-09-19 11:51 AM, Jeremy a écrit : > 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? Maybe a combination of these:
http://stackoverflow.com/a/3384496 http://www.thelinuxdaily.com/2010/05/grab-raw-keyboard-input-from-event-device-node-devinputevent/ F. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: PGP/Mime available upon request Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBZ94gACgkQfUcTXFrypNUUwQCfW7RTRDRWBobkWTZ1xckl4UtQ GywAn2G7Zo0NDIj/rmaANjQQFTtYmuCH =2ht6 -----END PGP SIGNATURE----- _______________________________________________ mlug mailing list [email protected] https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca
