mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
v4l-utils: support user keytable map in /storage/.config/
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
65bd18949d
commit
586092ce7b
20
packages/sysutils/v4l-utils/config/rc_maps.cfg.sample
Normal file
20
packages/sysutils/v4l-utils/config/rc_maps.cfg.sample
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Keymaps table
|
||||||
|
#
|
||||||
|
# This table creates an association between a keycode file and a kernel
|
||||||
|
# driver. It can be used to automatically override a keycode definition.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Format:
|
||||||
|
# driver - name of the driver provided via uevent - use * for any driver
|
||||||
|
# table - RC keymap table, provided via uevent - use * for any table
|
||||||
|
# file - file name. If directory is not specified, it is first looked up
|
||||||
|
# in /storage/.config/rc_keymaps, then /usr/lib/udev/rc_keymaps
|
||||||
|
#
|
||||||
|
# For example:
|
||||||
|
#
|
||||||
|
# driver table file
|
||||||
|
#
|
||||||
|
# gpio-rc-recv rc-streamzap streamzap
|
||||||
|
# gpio-rc-recv * justboom
|
||||||
|
# * rc-rc6-mce rc6_mce_new
|
||||||
|
# * * hauppauge_new
|
@ -0,0 +1,35 @@
|
|||||||
|
From 996fdbf54f4b6c479dc7dd6ab4ca7933730aba93 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matthias Reichl <hias@horus.com>
|
||||||
|
Date: Sun, 12 Mar 2017 12:22:14 +0100
|
||||||
|
Subject: [PATCH] ir-keytable: allow map rules override via
|
||||||
|
/storage/.config/rc_maps.cfg
|
||||||
|
|
||||||
|
Signed-off-by: Matthias Reichl <hias@horus.com>
|
||||||
|
---
|
||||||
|
utils/keytable/70-infrared.rules | 14 ++++++++++++--
|
||||||
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/utils/keytable/70-infrared.rules b/utils/keytable/70-infrared.rules
|
||||||
|
index afffd95..eef3234 100644
|
||||||
|
--- a/utils/keytable/70-infrared.rules
|
||||||
|
+++ b/utils/keytable/70-infrared.rules
|
||||||
|
@@ -1,4 +1,14 @@
|
||||||
|
# Automatically load the proper keymaps after the Remote Controller device
|
||||||
|
-# creation. The keycode tables rules should be at /etc/rc_maps.cfg
|
||||||
|
+# creation.
|
||||||
|
+#
|
||||||
|
+# User-defined rules can be stored in /storage/.config/rc_maps.cfg. If that
|
||||||
|
+# file doesn't exist the default rules from /etc/rc_maps.cfg are used.
|
||||||
|
|
||||||
|
-ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s $name"
|
||||||
|
+ACTION=="add", SUBSYSTEM=="rc", IMPORT{program}="/usr/bin/sh -c '\
|
||||||
|
+ if [ -r /storage/.config/rc_maps.cfg ] ; then \
|
||||||
|
+ echo rc_maps_cfg=/storage/.config/rc_maps.cfg ; \
|
||||||
|
+ else \
|
||||||
|
+ echo rc_maps_cfg=/etc/rc_maps.cfg ; \
|
||||||
|
+ fi'"
|
||||||
|
+
|
||||||
|
+ENV{rc_maps_cfg}=="?*", RUN+="/usr/bin/ir-keytable -a $env{rc_maps_cfg} -s $name"
|
||||||
|
--
|
||||||
|
2.1.4
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user