aboutsummaryrefslogtreecommitdiffstats
path: root/src/lirc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-10lirc: refactored event handlerThomas Jansen1-11/+17
* moved lirc_event to lirc.c and split out the parts that depend on variables in main.c into three separate functions * changed keyboard_event accordingly to avoid duplicate code * merged lirc_event with ncmpc_lirc_get_command
2008-11-07lirc: pass writable string to lirc_init()Max Kellermann1-1/+3
The "prog" argument of lirc_init() expects a non-const string. Pass a local string variable.
2008-11-07native LIRC support for ncmpcThomas Jansen1-0/+41
The attachment includes the patch and a sample .lircrc config for testing purposes (i. e. only a few commands are mapped to IR events). The config is rather simple to write: For each button add a block like this to ~/.lircrc: begin button = <button name from /etc/lircd.conf> prog = ncmpc config = <command name from src/command.c> end The patch is not finished, there are several problems that still need to be solved: 1. the configure.ac modifications are just for testing purposes and should be made optional with a parameter like --enable-lirc for ./configure. Unfortunately I'm not an expert on autoconfig tools. 2. LIRC example code [1] suggests looping over lirc_code2char, probably to have multiple actions that can be triggered from one button. Perhaps lirc_event(...) should be moved to lirc.c and be heavily modified, no longer being a mere copy of keyboard_event(...).