<commit_before>.TH LIRCD.CONF "5" "Last change: Apr 2017" "lircd.conf @version@" "File Formats Manual"
.SH NAME
lircd.conf \- lirc main configuration file
.SH DESCRIPTION

The file has two purposes: to provide timing information to the driver
so it can decode the data to button presses, and to provide a mapping
from button presses to key symbols used by
.BI  lircd(8).
.PP
The basic structure is a list of remote blocks.  Whitespace and line
breaks are used as delimiters.
.PP
If the comment character (#) appears as the first character on a line
the rest of the line is ignored.
.SH REMOTE BLOCKS
Remote blocks are either normal or raw.
.PP
Normal remote blocks begin with
.B begin remote
and ends with
.B end remote.
The first part of the block describes the basic properties of the
remote, see REMOTE DESCRIPTION SECTION.  Following this is a codes
section, which is delimited by
.B begin codes
and
.B end codes.

Each line in a codes section contains the name of a button on the remote
followed by a hexadecimal data value matching the data part of the IR
frame (see REMOTE DESCRIPTION SECTION). You may not assign the same name
to two buttons in the same remote section.
.PP
Raw remote blocks are identical to normal blocks besides the codes
section which is a list of button descriptions enclosed by
.B begin raw_codes
and
.B end raw_codes.

A raw button description begins with the parameter
.B name
followed by
the name of the button. The button description ends with the next button
description or the end of the raw_codes block. The lines in between is a
list of decimal numbers describing the signal sent by that button. The
first number indicates the duration of the first pulse in microseconds.
The second number indicates the duration of the space which follows it.
Pulse and space durations alternate for as long as is necessary. The
last duration should represent a pulse.
.SH REMOTE DESCRIPTION SECTION
Each line in this section contains a parameter followed by the value or
values that should be assigned to that parameter. Parameters
are optional unless otherwise stated.
.PP
All values are decimal integers that are either dimensionless or have units
of microseconds unless otherwise stated. Hexadecimal numbers should be
prefixed by 0x. If the remote does not have a particular "feature," then
the line may be omitted. The button code is sent just after the pre signal
and just before the post signal.
.PP
Some parameters describe the bits in the IR protocol. The frame is
normally defined like
.IP
|header|plead|pre data|pre|data|post|post data|ptrail|foot|gap|
.PP
where most parameters defaults to 0. Some parameters change the overall
frame layout e. g., the repeat parameter.

.TP 4
.B include \*(rq<path>\*(rq
Include the given path using normal
.I include
semantics. If the path is relative, it's  interpreted relative to the
main lircd.conf file. <path> must be enclosed in double quotes. It can
contain a glob(3) pattern in which case all matching files are included.
.TP 4
.B manual_sort <1|0>
Normally, lircd tries to sort multiple remotes so the one which decodes
fastest are used first. Setting manual_sort to 1 in any remote disables
this and uses the remotes in the order they are listed in lircd.conf or
as the alphanumerically sorted filenames in lircd.conf.d.
.TP 4
.B name <remote name>
The unique name assigned to the remote control (may not contain whitespace).
Within a single file all names must be unique. Parameter is mandatory.
.TP 4
.B suppress_repeat <repeats>
Suppress a given number of repeats for all buttons in this remote. Defaults
to 0, which means that no repeats are suppressed. Note that lircrc has a
corresponding
.I repeat
parameter which can be used to suppress repeats for specific button/client
combinations.
.TP 4
.B flags <flag1><|flag2>...
Flags are special text strings which describe various properties of the
remote and determine the semantics of some of the following fields.
Multiple flags should be separated by the pipe(|) symbol.  See FLAGS.
.TP 4
.B  driver <driver name>
For lirccode drivers which does not have timing information the optional
driver attribute names the driver which is required to use this remote.
.TP 4
.B bits <number of data bits>
The number of data bits in the hexadecimal codes which describe each
button (decimal integer).
.TP 4
.B eps <relative error tolerance>
The relative error tolerance for received signals in percent. By default,
irrecord set this to 30 (i. e., 30%).
.TP 4
.B aeps <absolute error tolerance>
The absolute error tolerance for received signals (microseconds). The
default is the hardcoded driver dependent resolution value. By
default irrecord sets this to 100.
.TP 4
.B header <phead> <shead>
The initial pulse and space sent (microseconds).
.TP 4
.B three <pthree> <sthree>
Only used by RC-MM remotes
.TP 4
.B two <ptwo> <stwo>
Only used by RC-MM remotes
.TP 4
.B one <pone> <sone>
The pulse and space lengths representing a one.
.TP 4
.B zero <pzero> <szero>
The pulse and space lengths representing a zero.
.TP 4
.B ptrail <trailing pulse>
A trailing pulse, immediately following the post_data.
.TP 4
.B plead <leading pulse>
A leading pulse, immediately after the header.
.TP 4
.B foot <pfoot> <sfoot>
A pulse and space, immediately following the trailing pulse.
.TP 4
.B repeat <prepeat> <srepeat>
A pulse and space that replaces everything between leading pulse and the
trailing pulse, whenever a signal is repeated. The foot is not sent, and
the header is not sent unless the REPEAT_HEADER flag is present.
.TP 4
.B pre_data_bits <number of pre_data_bits>
The number of bits in the pre_data code.
.TP 4
.B pre_data <hexadecimal number>
Hexadecimal code indicating the sequence of ones and zeros immediately
following the leading pulse.
.TP 4
.B post_data_bits <number of post data bits>
The number of bits in the post_data code.
.TP 4
.B post_data <hexadecimal number>
Hexadecimal code indicating the sequence of ones and zeros immediately
following the post signal.
.TP 4
.B pre <ppre> <spre>
A pulse and space immediately following the pre_data.
.TP 4
.B post <ppost> <spost>
A pulse and space immediately following the button code.
.TP 4<commit_msg>lircd.conf: Update <pre> documentation (#319).<commit_after>.TH LIRCD.CONF "5" "Last change: Feb 2018" "lircd.conf @version@" "File Formats Manual"
.SH NAME
lircd.conf \- lirc main configuration file
.SH DESCRIPTION

The file has two purposes: to provide timing information to the driver
so it can decode the data to button presses, and to provide a mapping
from button presses to key symbols used by
.BI  lircd(8).
.PP
The basic structure is a list of remote blocks.  Whitespace and line
breaks are used as delimiters.
.PP
If the comment character (#) appears as the first character on a line
the rest of the line is ignored.
.SH REMOTE BLOCKS
Remote blocks are either normal or raw.
.PP
Normal remote blocks begin with
.B begin remote
and ends with
.B end remote.
The first part of the block describes the basic properties of the
remote, see REMOTE DESCRIPTION SECTION.  Following this is a codes
section, which is delimited by
.B begin codes
and
.B end codes.

Each line in a codes section contains the name of a button on the remote
followed by a hexadecimal data value matching the data part of the IR
frame (see REMOTE DESCRIPTION SECTION). You may not assign the same name
to two buttons in the same remote section.
.PP
Raw remote blocks are identical to normal blocks besides the codes
section which is a list of button descriptions enclosed by
.B begin raw_codes
and
.B end raw_codes.

A raw button description begins with the parameter
.B name
followed by
the name of the button. The button description ends with the next button
description or the end of the raw_codes block. The lines in between is a
list of decimal numbers describing the signal sent by that button. The
first number indicates the duration of the first pulse in microseconds.
The second number indicates the duration of the space which follows it.
Pulse and space durations alternate for as long as is necessary. The
last duration should represent a pulse.
.SH REMOTE DESCRIPTION SECTION
Each line in this section contains a parameter followed by the value or
values that should be assigned to that parameter. Parameters
are optional unless otherwise stated.
.PP
All values are decimal integers that are either dimensionless or have units
of microseconds unless otherwise stated. Hexadecimal numbers should be
prefixed by 0x. If the remote does not have a particular "feature," then
the line may be omitted. The button code is sent just after the pre signal
and just before the post signal.
.PP
Some parameters describe the bits in the IR protocol. The frame is
normally defined like
.IP
|header|plead|pre data|pre|data|post|post data|ptrail|foot|gap|
.PP
where most parameters defaults to 0. Some parameters change the overall
frame layout e. g., the repeat parameter.

.TP 4
.B include \*(rq<path>\*(rq
Include the given path using normal
.I include
semantics. If the path is relative, it's  interpreted relative to the
main lircd.conf file. <path> must be enclosed in double quotes. It can
contain a glob(3) pattern in which case all matching files are included.
.TP 4
.B manual_sort <1|0>
Normally, lircd tries to sort multiple remotes so the one which decodes
fastest are used first. Setting manual_sort to 1 in any remote disables
this and uses the remotes in the order they are listed in lircd.conf or
as the alphanumerically sorted filenames in lircd.conf.d.
.TP 4
.B name <remote name>
The unique name assigned to the remote control (may not contain whitespace).
Within a single file all names must be unique. Parameter is mandatory.
.TP 4
.B suppress_repeat <repeats>
Suppress a given number of repeats for all buttons in this remote. Defaults
to 0, which means that no repeats are suppressed. Note that lircrc has a
corresponding
.I repeat
parameter which can be used to suppress repeats for specific button/client
combinations.
.TP 4
.B flags <flag1><|flag2>...
Flags are special text strings which describe various properties of the
remote and determine the semantics of some of the following fields.
Multiple flags should be separated by the pipe(|) symbol.  See FLAGS.
.TP 4
.B  driver <driver name>
For lirccode drivers which does not have timing information the optional
driver attribute names the driver which is required to use this remote.
.TP 4
.B bits <number of data bits>
The number of data bits in the hexadecimal codes which describe each
button (decimal integer).
.TP 4
.B eps <relative error tolerance>
The relative error tolerance for received signals in percent. By default,
irrecord set this to 30 (i. e., 30%).
.TP 4
.B aeps <absolute error tolerance>
The absolute error tolerance for received signals (microseconds). The
default is the hardcoded driver dependent resolution value. By
default irrecord sets this to 100.
.TP 4
.B header <phead> <shead>
The initial pulse and space sent (microseconds).
.TP 4
.B three <pthree> <sthree>
Only used by RC-MM remotes
.TP 4
.B two <ptwo> <stwo>
Only used by RC-MM remotes
.TP 4
.B one <pone> <sone>
The pulse and space lengths representing a one.
.TP 4
.B zero <pzero> <szero>
The pulse and space lengths representing a zero.
.TP 4
.B ptrail <trailing pulse>
A trailing pulse, immediately following the post_data.
.TP 4
.B plead <leading pulse>
A leading pulse, immediately after the header.
.TP 4
.B foot <pfoot> <sfoot>
A pulse and space, immediately following the trailing pulse.
.TP 4
.B repeat <prepeat> <srepeat>
A pulse and space that replaces everything between leading pulse and the
trailing pulse, whenever a signal is repeated. The foot is not sent, and
the header is not sent unless the REPEAT_HEADER flag is present.
.TP 4
.B pre_data_bits <number of pre_data_bits>
The number of bits in the pre_data code.
.TP 4
.B pre_data <hexadecimal number>
Hexadecimal code indicating the sequence of ones and zeros immediately
following the leading pulse.
.TP 4
.B post_data_bits <number of post data bits>
The number of bits in the post_data code.
.TP 4
.B post_data <hexadecimal number>
Hexadecimal code indicating the sequence of ones and zeros immediately
following the post signal.
.TP 4
.B pre <ppre> <spre>
A pulse and space immediately following the pre_data, used as delimiter
between \fIpre data\fR and \fIdata\fR.
.TP 4
.B post <ppost> <spost>
A pulse and space immediately following the button code.
.TP 4
{'fraction_non_alphanumeric': 0.04904479049606678, 'fraction_numerical': 0.007786161502648901, 'mean_word_length': 4.206435436690347, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 74, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '786085', 'n_tokens_mistral': 3562, 'n_tokens_neox': 3366, 'n_words': 2051}