summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.txt102
-rw-r--r--contrib/96-vdrkeymap.rules32
-rw-r--r--contrib/hama-mce18
-rw-r--r--contrib/tt6400-ir129
-rw-r--r--contrib/x10-wti55
5 files changed, 336 insertions, 0 deletions
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..82d8d2f
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,102 @@
+Purpose of this plugin
+======================
+
+Hotplugging of input devices is common nowadays and more or less
+required by recent initsystems. E.g. users might want to turn on
+their Bluetooth keyboard when VDR has been started already, or the
+initsystem might start 'vdr' although the USB remote control has not
+been initialized yet.
+
+Naming of input devices is also dynamic, so that the remote control might
+be sometimes at /dev/input/event4 and sometimes at /dev/input/event6.
+
+To deal with this situation, this plugin hotplugs (and hotunplugs)
+input devices. The corresponding events are generated by 'udev' rules
+so that an input devices becomes available to vdr as soon as it has
+been attached.
+
+All the configuration (e.g. blacklisting of devices (e.g. the system
+keyboard) or installation of keymaps) must be done within custom udev
+rules.
+
+
+
+Coldplugging
+============
+
+It can happen that input devices are created when vdr has not been
+started yet. Hotplug events will not be created then and device will
+not show up in vdr then.
+
+To deal with this (common) situation, the plugin adds all event devices
+from a specific directory at startup. This directory must be filled by
+udev rules and by default this directory is /dev/vdr/input.
+
+
+
+Manual control
+==============
+
+$ socat stdin unix-send:/run/vdr/inputdev
+add event3
+remove /dev/input/even5
+dump all # --> see syslog for results
+
+
+
+Keymaps
+=======
+
+The aged vdr input system supports only a small subset of the /dev/input
+features and is incompatible in some details. The plugin implements a
+static mapping of /dev/input events to vdr events. Learning of remote
+control codes is *not* supported; the keymap of the input device must be
+configured with standard Linux mechanisms (EVIOCSKEYCODE ioctl).
+
+Please see cInputDevice::install_keymap (inputdev.c) for the expected
+mapping and contrib/96-vdrkeymap.rules for samples how to setup keymaps.
+The 'contrib/' directory contains some keymaps too.
+
+
+
+Plugin options
+==============
+
+ --socket|-s <socket> ... unix dgram socket for hotplug events
+ (default: /var/run/vdr/inputdev)
+
+
+Installation
+============
+
+ 1. Build and install the plugin as usual
+
+ 2. Build the 'vdr-inputdev' udev helper and install it at the 'udev'
+ program location (usually /lib/udev)
+
+ 3. Create custom 'udev' rules and install them in the local rules
+ directory (usually /etc/udev/rules.d)
+
+ 4. Create keymaps for your remote controls and install them; when
+ using 'keymap' program from 'udev', the keymaps are searched in
+ /lib/udev/keymaps but you can specify a full path in the udev
+ rules too.
+
+
+
+Creating keymap rules
+=====================
+
+ 1. Plugin the device
+
+ 2. Remove it either manually from vdr (see "Manual control" above)
+ or stop vdr
+
+ 3. Use a program like 'evtest' or 'keymap' from 'udev' to display
+ events:
+
+ /lib/udev/keymap -i /dev/input/event4
+
+ 4. Press the keys you want to configure, record their scancode and
+ the wanted key identifier. See cInputDevice::install_keymap
+ (inputdev.c) for supported key identifiers.
diff --git a/contrib/96-vdrkeymap.rules b/contrib/96-vdrkeymap.rules
new file mode 100644
index 0000000..b475649
--- /dev/null
+++ b/contrib/96-vdrkeymap.rules
@@ -0,0 +1,32 @@
+SUBSYSTEM!="input", GOTO="vdrkeymap_end"
+KERNEL!="event*", GOTO="vdrkeymap_end"
+
+#### blacklist input devices which shall not be used by 'vdr'
+
+# HAMA MCE remote control
+ENV{ID_VENDOR_ID}=="05a4", ENV{ID_MODEL_ID}=="9881", GOTO="vdrkeymap_end"
+
+
+#### install custom keymaps
+
+# x10-wti
+ENV{ID_VENDOR_ID}=="0bc7", ENV{ID_MODEL_ID}=="0006", ENV{ID_INPUT_KEY}=="1", RUN+="keymap $name x10-wti"
+
+# TT6400 remote control
+ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7160", RUN+="keymap $name tt6400-ir"
+
+
+#### do 'vdr' specific actions
+
+# generate hotplug event
+RUN+="vdr-inputdev $name"
+
+# create coldplug entry
+SYMLINK+="vdr/$name"
+
+# set permissions
+MODE="0640", OWNER="vdr"
+
+
+
+LABEL="vdrkeymap_end"
diff --git a/contrib/hama-mce b/contrib/hama-mce
new file mode 100644
index 0000000..80c1612
--- /dev/null
+++ b/contrib/hama-mce
@@ -0,0 +1,18 @@
+# see https://github.com/ensc/hama-mce-remoted
+
+0x00 program
+0x01 power
+0x02 yellow
+0x03 blue
+0x04 green
+0x05 red
+0x06 channel
+0x07 archive
+0x08 audio
+0x09 subtitle
+0x11 exit
+0x12 menu
+0x17 ok
+0x1e previous
+0x29 info
+0x2a option
diff --git a/contrib/tt6400-ir b/contrib/tt6400-ir
new file mode 100644
index 0000000..7588109
--- /dev/null
+++ b/contrib/tt6400-ir
@@ -0,0 +1,129 @@
+## Standard Remote control
+0x160001 power
+0x160018 mute
+
+0x160003 kp1
+0x160004 kp2
+0x160005 kp3
+0x160006 kp4
+0x160007 kp5
+0x160008 kp6
+0x160009 kp7
+0x16000a kp8
+0x16000b kp9
+0x16000c kp0
+
+#0x160031 delete
+0x160031 info
+#0x16001a tv
+0x16001a option
+
+# 0x16001b tool
+# 0x160027 menu
+# 0x160021 opt
+# 0x160002 backspace
+0x16001b channel
+0x160027 archive
+0x160021 audio
+0x160002 previous
+
+0x160023 channelup
+0x160024 channeldown
+0x160012 menu # '!'
+0x160019 subtitle # "TXT"
+0x160025 volumeup
+0x160026 volumedown
+0x160014 red
+0x160015 green
+0x160016 yellow
+0x160017 blue
+0x16000d up
+0x16000e left
+0x160010 right
+0x160011 down
+0x16000f ok
+0x160022 epg
+0x160013 exit
+0x160053 record
+0x160054 rewind
+#0x160055 playpause
+0x160055 play
+0x160056 forward
+#0x160046 pvr
+0x160046 fn_f1 # PVR
+0x160047 previoussong
+0x160035 stop
+0x160030 nextsong
+
+# last two rows of the standard remote control
+0x21 fn_f2 # tv channel -
+0x20 fn_f3 # tv channel +
+0x11 fn_f4 # tv volume -
+0x10 fn_f5 # tv volume +
+0x0c fn_f6 # tv power
+0x38 fn_f7 # tv input
+
+
+## Hauppauge remote control
+
+#0x1e003b goto # "Go"
+0x1e003b program # "Go"
+0x1e003d power
+
+#0x1e001c tv
+0x1e001c channel # "TV"
+#0x1e0018 video # "Videos"
+0x1e0018 archive # "Videos"
+0x1e0019 audio # "Music"
+#0x1e001a directory # "Pictures"
+0x1e001a info # "Pictures"
+
+0x1e001b epg # "Guide"
+#0x1e000c radio
+0x1e000c subtitle
+
+0x1e0014 up
+0x1e0015 down
+0x1e0016 left
+0x1e0017 right
+0x1e0025 ok
+
+0x1e001f exit # Back/Exit
+0x1e000d menu
+
+0x1e0010 volumeup
+0x1e0011 volumedown
+0x1e0012 previous # Prev.Ch
+0x1e000f mute
+0x1e0020 channelup
+0x1e0021 channeldown
+
+0x1e0037 record
+0x1e0036 stop
+0x1e0032 rewind
+0x1e0034 forward
+0x1e0035 play
+0x1e0024 previoussong # |< replay
+0x1e0030 pause
+0x1e001e nextsong # >| Skip
+
+0x1e0001 kp1
+0x1e0002 kp2
+0x1e0003 kp3
+0x1e0004 kp4
+0x1e0005 kp5
+0x1e0006 kp6
+0x1e0007 kp7
+0x1e0008 kp8
+0x1e0009 kp9
+0x1e0000 kp0
+
+#0x1e000a text # '*' "Text"
+0x1e000a info # '*' "Text"
+#0x1e000e subtitle # '#' Sub/CC
+0x1e000e option # '#' Sub/CC
+
+0x1e000b red
+0x1e002e green
+0x1e0038 yellow
+0x1e0029 blue
diff --git a/contrib/x10-wti b/contrib/x10-wti
new file mode 100644
index 0000000..4dcc1b5
--- /dev/null
+++ b/contrib/x10-wti
@@ -0,0 +1,55 @@
+0x02 power
+0x32 red
+0x34 yellow
+0x33 green
+0x16 previous # "txt"
+0x35 blue
+
+0x20 exit
+#0x2f info
+0x2f menu # 'I'
+0x1a up
+0x1d left
+0x1f right
+0x22 down
+0x1e ok
+
+0x18 channel
+0x04 archive
+0x1c audio
+0x04 info
+
+0x09 volumeup
+0x08 volumedown
+
+0x1b program
+0x00 mute
+
+0x0b channelup
+0x0c channeldown
+
+0x21 previoussong # |<
+0x23 nextsong # >|
+0x27 record
+0x29 pause
+0x28 stop
+0x24 rewind
+0x25 play
+0x26 forward
+
+0x0d kp1
+0x0e kp2
+0x0f kp3
+0x10 kp4
+0x11 kp5
+0x12 kp6
+0x13 kp7
+0x14 kp8
+0x15 kp9
+0x17 kp0
+
+0x37 info # '*'
+0x38 option # '#'
+
+0x30 epg
+0x28 subtitle