<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <HEAD> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE>LIRC - Linux Infrared Remote Control</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="lirc.css"> <LINK REL="shortcut icon" HREF="../images/favicon.ico"> <META NAME="description" CONTENT="LIRC - Linux Infrared Remote Control"> <META NAME="keywords" CONTENT="linux remote control, multimedia"> <META charset="UTF-8"> </HEAD> <body> <TABLE CLASS="menu"><TR> <TD CLASS="menu"><IMG class="menuimg" SRC="../images/diode.gif" ALT="LIRC icon" ALIGN="LEFT"></TD> <TD><IMG class="menuimg" SRC="../images/lirc.gif" ALT="LIRC logo" ALIGN="RIGHT"></TD> </TR></TABLE> <h1>lirc-config-tool</h1> Section: Misc. Reference Manual Pages (1)<br>Updated: Aug 2015<br><a href="#index">Index</a> <a href="index.html">Return to Main Contents</a><hr> <a name="lbAB"> </a> <h2>NAME</h2> <p> <b>lirc-config-tool</b> - tool to scan and generate lirc config files <a name="lbAC"> </a> </p> <h2>SYNOPSIS</h2> <p> <b>lirc-config-tool </b> <i>-s</i>|<i>-u</i> [<i> -c FILE</i>] </p> <p> <b>lirc-config-tool </b> [<i>-o DIR</i>] [<i>-d</i>] [<i>-c FILE</i>] [<i>FILES</i>] <br> </p> <p> <b>lirc-config-tool </b> <i>-l</i> <a name="lbAD"> </a> </p> <h2>OPTIONS</h2> Without options, generates all available application specific lircrc files in ~/.config/lirc. The optional [files] is a list of files to build or dump, as listed by -l. <dl> <div><dt><b>-s</b></dt></div> <dd> Scan lircd file for key symbols which are duplicated or not in namespace. </dd> <div><dt><b>-u</b></dt></div> <dd> Update existing lircd file to use key symbols in namespace. </dd> <div><dt><b>-l</b></dt></div> <dd> List available files to generate. </dd> <div><dt><b>-d</b></dt></div> <dd> Dump file templates usable as stdin on stdout. </dd> <div><dt> <b>-o</b> <i> <dir></i> </dt></div> <dd> Output directory, defaults to ~/.config/lirc </dd> <div><dt> <b>-c</b> <i> <lircd-filename></i> </dt></div> <dd> <a href="lircd.html">lircd</a>(8) config file, defaults to /etc/lirc/lircd.conf </dd> <div><dt><b>-h</b></dt></div> <dd> Print help message </dd> </dl> <p> <a name="lbAE"> </a> </p> <h2>DESCRIPTION</h2> <p> The script is designed to assist in the setup of the <a href="lirc.html">lirc</a>(8) configuration files for ordinary remote controls. It is not aimed to handle full-blown keyboards or joystick devices. The generated lircrc files represents a starting point which will need further, manual refinements but might "work" in a basic sense in many cases. </p> <p> The setup involves normalizing the lircd.conf to use symbols in the legal namespace, and to create application specific lircrc files which uses the normalized symbols. </p> <p> To assist normalizing /etc/lircd.conf, the script can report symbols used which not are in the namespace. It can can also update many of these symbols to corresponding symbols within the namespace. </p> <p> The script also can create application specific lircrc files such as mythtv.lircrc or vlc.lircrc. It then uses the normalized key symbols in /etc/lirdc.conf. By default, files are created in ~/.config/lirc. </p> <p> Generated lircrc files basically combines known keys from /etc/lirc/lircd.conf with template data for an application. The process results in a lircrc file, a list a of unused keys and some entries which don't match any existing key. The unused keys and unmatched entries are written as comments into the generated file. </p> <p> An 'illegal' key i. e., a key not in namespace, will not match any entry and will thus always be unused. However, it's perfectly possible to use it later on while manually modifying the lircrc files. </p> <p> When updating files, script always makes backup copies. </p> <p> The generated lircrc files are intended to be included in a main ~/.config/lircrc file. A minimal such might look like </p> <dl> <div><dt></dt></div> <dd> <br> include ~/.config/lirc/mythtv.lircrc <p> </p> </dd> </dl> <a name="lbAF"> </a> <h2>EXAMPLES</h2> <p> </p> <p> Scan /etc/lirc/lircd.conf for duplicated symbols and symbols not in namespace: </p> <dl> <div><dt></dt></div> <dd> lirc-config-tool -s </dd> </dl> <p> Update a local lircd.conf file to use symbols in namespace: </p> <dl> <div><dt></dt></div> <dd> lirc-config-tool -uc ./lircd.conf </dd> </dl> <p> List available files to generate: </p> <dl> <div><dt></dt></div> <dd> lirc-config-tool -l </dd> </dl> <p> Generate one of the files listed by -l, creates ~/.config/lirc/mythtv.lircrc: </p> <dl> <div><dt></dt></div> <dd> lirc-config-tool mythtv </dd> </dl> <p> Dump template data for mythtv: </p> <dl> <div><dt></dt></div> <dd> lirc-config-tool -d mythtv >mythtv.lircdata </dd> </dl> <p> Use possibly edited data to create a modified mythtv.lircrc in current dir: </p> <dl> <div><dt></dt></div> <dd> lirc-config-tool -o . stdin < mythtv.lircdata <p> </p> </dd> </dl> <a name="lbAG"> </a> <h2>LIRCD.CONF CONVERSIONS</h2> The -s option simply reports all key symbols not in namespace. It also reports some symbols which although legal are inappropriate in this context, notably KEY_NUMERIC_0..KEY_NUMERIC_9. If present, duplicated keys are also reported. <p> The -u option converts several known symbols to their corresponding KEY_* symbols. Symbols which have names like KEY_WINDOWS but not are in namespace gets a X_ prefix e. g., KEY_WINDOWS -> X_KEY_WINDOWS. The converted file thus guarantees that any key symbol starting with KEY_ is a legal symbol. </p> <p> All known numeric keys such as '1', 'KEY_1', 'KEY_KP_1', 'KEY_NUMERIC_1 are converted to KEY_1. </p> <p> All modifications are marked by comments in file. </p> <p> <a name="lbAH"> </a> </p> <h2>EXTENDING</h2> The script can be extended to support more applications by providing a shell function named *.lircdata. E. g., to add a new application named "my_app" based on the built-in vlc application: <p> <br> $ lirc-config-tool -d vlc >my_app.lircdata <br> $ function my_app_lircdata() <br> > { <br> > cat my_app.lircdata <br> > } <br> $ export -f my_app_lircdata <br> $ lirc-config-tool my_app </p> <p> <a name="lbAI"> </a> </p> <h2>DATA FORMAT</h2> The script uses a simple, line-oriented format to represent the lircrc files. The purpose of the format is to be compact and thus to give a good overview, and also to be easy to parse. Each line is divided in comma-separated tokens. There are four kind of lines. <p> Comment lines begins with a '#'. These are copied verbatim to the output file. </p> <p> The first data line represents global items, applicable to all entrys. The first word is the program name. It's used in the first 'program=' line. Following words, if present, are optional lines which will be appended to each entry in the file. </p> <p> A data line starting with 'begin' or 'end' is a mode block designator. It's copied verbatim to output file. </p> <p> All other data lines represents a button/config entry. The format is <br> <button> <config> [extra]... <br> The button value is used in the button = line, and the config item is used in the config = line. Both are mandatory. Following items, if any, are copied as verbatim lines to the entry. </p> <p> An unlikely example: The data format </p> <p> <br> myprog, flags = quit <br> begin volume_mode <br> KEY_VOLUMEUP, volume-up, delay=4, repeat=1 <br> KEY_VOLUMEDOWN, volume-down <br> end volume_mode </p> <p> translates to: </p> <p> <br> begin volume_mode <br> begin <br> program = myprog <br> button = KEY_VOLUME_UP <br> config = volume-up <br> delay = 4 <br> repeat = 1 <br> flags = quit <br> end <br> begin <br> program = myprog <br> button = KEY_VOLUME_DOWN <br> config = volume-down <br> flags = quit <br> end <br> end volume_mode </p> <p> <a name="lbAJ"> </a> </p> <h2>COPYRIGHT</h2> <p> License GPLv2+: GNU GPL version 2 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. <a name="lbAK"> </a> </p> <h2>SEE ALSO</h2> <p> <a href="lircd.html">lircd</a>(8) <br> <a href="http://www.lirc.org/">http://www.lirc.org/</a> - Main lirc documentation </p> <p> </p> <p> </p> <hr> <a name="index"> </a><h2>Index</h2> <dl> <div><dt><a href="#lbAB">NAME</a></dt></div> <dd> </dd> <div><dt><a href="#lbAC">SYNOPSIS</a></dt></div> <dd> </dd> <div><dt><a href="#lbAD">OPTIONS</a></dt></div> <dd> </dd> <div><dt><a href="#lbAE">DESCRIPTION</a></dt></div> <dd> </dd> <div><dt><a href="#lbAF">EXAMPLES</a></dt></div> <dd> </dd> <div><dt><a href="#lbAG">LIRCD.CONF CONVERSIONS</a></dt></div> <dd> </dd> <div><dt><a href="#lbAH">EXTENDING</a></dt></div> <dd> </dd> <div><dt><a href="#lbAI">DATA FORMAT</a></dt></div> <dd> </dd> <div><dt><a href="#lbAJ">COPYRIGHT</a></dt></div> <dd> </dd> <div><dt><a href="#lbAK">SEE ALSO</a></dt></div> <dd> </dd> </dl> <hr> <p> This document was created by <a href="index.html">man2html</a>, using the manual pages.<br> Time: 12:55:08 GMT, February 16, 2019 </p> <p class="footer"> [<A HREF="http://www.lirc.org/">LIRC homepage</A>] </p> </body> </html>