Merge pull request #3019 from CvH/9.0/kodi-remote

kodi: add kodi-remote script
This commit is contained in:
MilhouseVH 2018-10-18 14:40:02 +01:00 committed by GitHub
commit bde9f81d8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 0 deletions

View File

@ -279,6 +279,7 @@ post_makeinstall_target() {
mkdir -p $INSTALL/usr/bin
cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin
ln -sf cputemp $INSTALL/usr/bin/gputemp
cp $PKG_DIR/scripts/kodi-remote $INSTALL/usr/bin
cp $PKG_DIR/scripts/setwakeup.sh $INSTALL/usr/bin
mkdir -p $INSTALL/usr/share/kodi/addons

View File

@ -0,0 +1,50 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
echo "Supported keys:
← ↑ ↓ → Left | Up | Down | Right
Context Menu c
Player Debug d
Fullscreen f
Info i
Codec Info o
Pause p
Screenshot s
Skin Debug t
Stop x
Volume Down -
Volume Up +
Back Backspace
Select Enter
Quit Remote q or ctrl+c
"
com() {
kodi-send --action="$1" > /dev/null 2>&1
echo -ne "\r$1\e[K";
}
while true; do
read -r -sn1 k
case "$k" in
A) com "Up";;
B) com "Down";;
C) com "Right";;
D) com "Left";;
c) com "ContextMenu";;
d) com "PlayerDebug";;
f) com "FullScreen";;
i) com "Info";;
o) com "CodecInfo";;
p) com "Pause";;
s) com "TakeScreenshot";;
t) com "Skin.ToggleDebug";;
x) com "Stop";;
-) com "VolumeDown";;
+) com "VolumeUp";;
$'\177') com "Back";;
"") com "Select";;
q) exit
esac
done