I'm trying to have my Raspberry Pi function as a GUIless music player. I've got Arch Linux installed, and use it through ssh. I've got also an IR receiver dongle, and I'm planning to use it to control the music volume, skip to the next song, play a random song etc.The IR dongle identifies as a keyboard, and writes to /dev/input/event0. At first I tried to make it work with LIRC, but apparently IR dongles that pretend that they are keyboards don't function well with LIRC.My question is that now that I've got some keyboard-like input from my IR receiver, how could I pipe that to the program? Currently I'm using cmus in screen.If there is some kind of general advice how to make my setup work, I'll happily hear that. If not, at least I'd like to get some idea how to connect the IR-receiver-keyboard to a program running in screen.Edit:How stupid of me, why didn't I think of simply catting it in.However, there's a bunch of problems:First of all, cat /dev/input/event0 just outputs mumble jumble (looks like this, in UTF-8 terminal: SSxOSSxjSSxSSCOSSCjSSC. One keypress might output half a row of this, and the longer you press, the longer the output.). It certainly responds every time I hit a button of my remote, but I'm not sure what encoding the bytes are in, are they just scancodes or what.Secondly, I still want to control it from ssh, so I need input multiplexer.Third, when I type the following:cat /dev/input/event0 | screen -rd or cat /dev/input/event0 | screen cmusit complains:Must be connected to a terminal.
Connect a keyboard / IR controller to a command line program running in a screen
linux;keyboard;input
I am not sure I correctly understand your situation, butcat /dev/input/event0 | someprogramshould make someprogram read from standard input, whatever is written to /dev/input/event0.(May I ask how you where able to make the IR receiver write to a device file. That is something I failed to accomplish with my IR dongle.)My general advice is to read from the file in a python script, and based on what character you have read, you can do something.inputCharStream = open('/dev/input/event0')while True:    c = inputCharStream.read(1)    if c=='a':        print character a    if c==chr(1):        print byte 1 which is not printable        breakInstead of printing nonsense, you can use some python library and do something useful.