1LIRCD-UINPUT(8)             System Managers Manual             LIRCD-UINPUT(8)
2
3
4

NAME

6       lircd-uinput - Forward lirc button presses as uinput events
7
8

SYNOPSIS

10       lircd-uinput [options]... [lircd output socket]
11       lircd-uinput [options]... [file]
12
13

DESCRIPTION

15       lircd-uinput  reads  decoded button press events from a lircd(8) output
16       socket and injects these as key events to  the  kernel  uinput  device.
17       The  kernel  makes  these  events  available to other applications on a
18       /dev/input/event device, just as for regular input hardware.
19
20       lircd-uinput is designed to run as a systemd service.
21
22       The lircd output socket argument is an optional path to the lircd  out‐
23       put  socket.  It defaults to the output value in the [lircd] section of
24       the lirc_options config file, falling back to /var/run/lirc/lircd.
25
26       If a plain file is given instead of a socket it is supposed to  contain
27       button press events formatted as documented in lircd(8) .  lircd-uinput
28       will in this case send the codes in this file and exit.
29
30       In order to work, release events must be sent  to  the  uinput  device.
31       See REPEAT HANDLING.
32
33       lircd-uinput  can  only  handle  button events named using the official
34       namespace i. e., buttons known to the kernel. See NOTES.
35
36       Unless the /dev/uinput  default  permissions  are  changed  lirc-uinput
37       needs to run as root. See NOTES.
38
39       The  /dev/input/event  device  created  by  the kernel can be tricky to
40       locate, and is not stable.  See NOTES.
41
42

OPTIONS

44       -u --uinput <device>
45              uinput kernel device, defaults to /dev/uinput.
46
47       -r --release-suffix <suffix>
48              lircd-uinput generates different events depending on if the but‐
49              ton name ends with the release-suffix or not.  Defaults to _EVUP
50              . See REPEAT HANDLING
51
52       -R --repeat <delay[,period] | ,period>
53              Set kernel autorepeat parameters of the created /dev/input/event
54              device.   delay is the time before repeating a key event, period
55              is the time between repeated key events.   Both  values  are  in
56              milliseconds,  separated  by a comma.  Any  value can be omitted
57              or set to 0 in which case the kernel/system defaults  are  used.
58              See REPEAT HANDLING.
59
60       -a --add-release-events
61              Generate  synthetic  release  events.   This option is mandatory
62              unless lircd is using  the  deprecated  --release  option.   The
63              timeout  used  can  be modified using the release-timeout key in
64              the lircd-uinput section of the lirc_options.conf file.  Useless
65              if used with a text file as input.  . See REPEAT HANDLING
66
67       -d --disabled <disabled buttons file path>
68              The  path  of  a  file which contains name of buttons to be dis‐
69              abled, one per line.  By default, lircd-uinput sends all buttons
70              found in input.  See NOTES.
71
72       -O --options-file <path>
73              Options    file    holding    default    values.   Defaults   to
74              /etc/lircd/lirc_options.conf
75
76       -L, --logfile <logfile path>
77              Select the log file, either the string 'syslog' indicating  that
78              syslog(1)  should be used or a log file path.  The default is to
79              use syslog.
80
81       -D, --loglevel [level]
82              Determine the amount of logging information.   level  can  be  a
83              symbolic  syslog  level:  'error','warning,  'info', 'notice' or
84              ´debug'.  lircd-uinput  also  defines  three  additional  levels
85              'trace',  'trace1'  and  'trace2' which gives even more messages
86              ('trace2' bringing the most).  However, in the  log  these  mes‐
87              sages are marked as 'debug'.
88
89       -h --help
90              Display usage summary.
91
92       -v --version
93              Display version info.
94
95

REPEAT HANDLING

97       After  receiving a keypress event the kernel will start emitting repeat
98       events to applications until lircd-uinput emits a corresponding release
99       event.   The release events could be created by lircd(8) using the dep‐
100       recated --release option.  Such events typically has  an  _EVUP  suffix
101       appended to the original keypress event.
102
103       The preferred way is that lircd-uinput creates release events using the
104       --add-release-events option.  Combining both  of  these  options  might
105       give unexpected results.
106
107       Note that the linux kernel uses the suffix _UP (which was used py lircd
108       prior to 0.10.0) for other purposes since 4.7.
109
110       In any case, the repeat events generated by the kernel can  be  tweaked
111       using  the  --repeat option. This can set the time between the keypress
112       event and the first repeat event  and  the  time  between  each  repeat
113       event.   The --repeat option should only be used if no other program or
114       udev rule is automatically setting up key repeat parameters.  By design
115       the repeat parameters can't be set in an atomic way during input device
116       registration so this option is prone to race conditions.
117
118       Note that the lircd-uinput repeat-event handling differs from  lircd(8)
119       which   implements (emulates) hardware autorepeat in the events sent to
120       uinput (event.value  ==  2).   lircd-uinput  only  sends  keypress  and
121       release events, trusting the kernel autorepeat support.
122
123

NOTES

125       By  default,  the  dev/uinput device is not writable for regular users.
126       Thus lircd-uinput needs to run as root  unless  these  permissions  are
127       changed.
128
129       One  way  to  achieve this is an udev rule.  The lirc distribution con‐
130       tains an example rule which makes the lircd-uinput device writable  for
131       users  in  the  group  lirc.   Another  way is to use lircd-setup(8) to
132       change the permissions. As distributed, the lirc_options.conf file con‐
133       tains an commented example using setfacl(1) .
134
135       lircd-uinput  can  only forward lircd button events with names from the
136       legal namespace defined by the kernel.  A  complete  list  of  possible
137       button  names   is  available in /usr/include/linux/input-event-codes.h
138       and also using irrecord -l .  Other button names are silently dropped.
139
140       The event keycode depends on the name that was given a  button  in  the
141       lircd config file e.g., if the button is named KEY_1 the keycode 1 will
142       be generated.
143
144       The kernel makes the events generated by lircd-uinput  available  on  a
145       /dev/input  device  like  /dev/input/event12.   This device name is not
146       stable and typically varies after a reboot.  The lirc distribution con‐
147       tains  a  udev  rule  which  if  installed  creates a device link named
148       /dev/lircd-uinput which always can be used.
149
150       lircd-uinput is designed to replace the currently  deprecated  --uinput
151       option  to  lircd(8).  However, lircd-uinput forwards all events unless
152       blocked by the --disabled option.  On the other  hand,  lircd  --uinput
153       does not forward all events - the heuristics used has been changed over
154       versions.
155
156

BUGS

158       Since the device name is fixed, only one instance of  lircd-uinput  can
159       run on a system.
160
161

SEE ALSO

163       lircd(8)
164       irrecord(1)
165       http://www.kernel.org/doc/Documentation/input/event-codes.txt
166
167
168
169lircd.uinput 0.10.0          Last change: Jun 2017             LIRCD-UINPUT(8)
Impressum