kodi: configure libinput to ignore power button input devices on GBM

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2023-09-24 14:20:50 +02:00
parent 2b8c9621b4
commit a77515bf43
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,12 @@
# Ignore power button input devices in libinput so logind can handle them
ACTION=="remove", GOTO="end"
SUBSYSTEM!="input", GOTO="end"
KERNEL!="event*", GOTO="end"
IMPORT{parent}="KEY"
# match devices that only generate KEY_POWER (code 116) events
ENV{KEY}=="10000000000000 0", ENV{LIBINPUT_IGNORE_DEVICE}="1"
LABEL="end"

View File

@ -407,6 +407,12 @@ post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/cache/libreelec
cp ${PKG_DIR}/config/network_wait ${INSTALL}/usr/cache/libreelec
# GBM: install udev rule to ignore the power button in libinput/kodi so logind can handle it
if [ "${DISPLAYSERVER}" = "no" ]; then
mkdir -p ${INSTALL}/usr/lib/udev/rules.d/
cp ${PKG_DIR}/config/70-libinput-ignore-power-button.rules ${INSTALL}/usr/lib/udev/rules.d/
fi
# update addon manifest
ADDON_MANIFEST=${INSTALL}/usr/share/kodi/system/addon-manifest.xml
xmlstarlet ed -L -d "/addons/addon[text()='service.xbmc.versioncheck']" ${ADDON_MANIFEST}