Jump to content


Photo

help hotkey function


  • Please log in to reply
49 replies to this topic

Re: help hotkey function #41 zaccomass

  • Senior Member
  • 117 posts

0
Neutral

Posted 15 October 2019 - 13:26

 

Change this file

https://github.com/O...data/keymap.xml

it is located on /usr/share/enigma2 on your box

Just an example...

                <map context="InfobarSeekActions">
                               <key id="KEY_PREVIOUSSONG" mapto="seekBack" flags="b"/>
                               <key id="KEY_NEXTSONG" mapto="seekFwd" flags="b"/>
                               <key id="KEY_PREVIOUSSONG" mapto="seekBackManual" flags="l"/>
                               <key id="KEY_NEXTSONG" mapto="seekFwdManual" flags="l"/>
                               <key id="KEY_PLAYPAUSE" mapto="playpauseService" flags="m"/>
-                               <key id="KEY_PAUSE" mapto="pauseService" flags="m"/>
+                               <key id="KEY_YELLOW" mapto="pauseService" flags="m"/>
                               <key id="KEY_PLAY" mapto="unPauseService" flags="m"/>
                               <key id="KEY_REWIND" mapto="seekBack" flags="b"/>
                               <key id="KEY_FASTFORWARD" mapto="seekFwd" flags="b"/>
                               <key id="KEY_REWIND" mapto="seekBackManual" flags="l"/>
                               <key id="KEY_FASTFORWARD" mapto="seekFwdManual" flags="l"/>
                               <key id="KEY_PREVIOUS" mapto="jumpPreviousMark" flags="m"/>
                               <key id="KEY_NEXT" mapto="jumpNextMark" flags="m"/>
                               <key id="KEY_LEFT" mapto="seekBack" flags="m"/>
                               <key id="KEY_RIGHT" mapto="seekFwd" flags="m"/>
                               <key id="KEY_OK" mapto="okButton" flags="m"/>
                               <key id="KEY_1" mapto="seekdef:1" flags="m"/>
                               <key id="KEY_3" mapto="seekdef:3" flags="m"/>
                               <key id="KEY_4" mapto="seekdef:4" flags="m"/>
                               <key id="KEY_6" mapto="seekdef:6" flags="m"/>
                               <key id="KEY_7" mapto="seekdef:7" flags="m"/>
                               <key id="KEY_9" mapto="seekdef:9" flags="m"/>
                </map>

Are the changes I asked you already understood?



Re: help hotkey function #42 zaccomass

  • Senior Member
  • 117 posts

0
Neutral

Posted 15 October 2019 - 13:33

if I understood correctly, did you only enter this as a test?
 
<key id="KEY_YELLOW" mapto="pauseService" flags="m"/>


Re: help hotkey function #43 zaccomass

  • Senior Member
  • 117 posts

0
Neutral

Posted 15 October 2019 - 13:51

I tried but by pressing the yellow button it goes into audio .... it doesn't go

Re: help hotkey function #44 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 15 October 2019 - 14:33

Then you have to search in the keymap.xml where the audio is processed via the yellow key and remove/commented out (<!-- -->) that line.


Edited by littlesat, 15 October 2019 - 14:34.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: help hotkey function #45 Pike_Bishop

  • Senior Member
  • 1,116 posts

+72
Good

Posted 15 October 2019 - 21:33

if it is not important for you to start a script with only one button you can try the plugin ppanel, i use both (hotkey and ppanel)

for ppanel we have a .xml to start scripts betweeen.

 

 

regards

Pike


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: help hotkey function #46 zaccomass

  • Senior Member
  • 117 posts

0
Neutral

Posted 16 October 2019 - 06:49

if it is not important for you to start a script with only one button you can try the plugin ppanel, i use both (hotkey and ppanel)

for ppanel we have a .xml to start scripts betweeen.

 

 

regards

Pike

Give me an example
with ppanel with an .xml with the keys I need (see above)



Re: help hotkey function #47 zaccomass

  • Senior Member
  • 117 posts

0
Neutral

Posted 16 October 2019 - 09:34

Finally I managed to get my scripts working through the Hotkey function, I found out that the PPanel was missing, installed that now goes. I have only one problem when I run the script that has to pause me, I can't insert the key waiting command which, once pressed, starts streaming again.



Re: help hotkey function #48 zaccomass

  • Senior Member
  • 117 posts

0
Neutral

Posted 16 October 2019 - 09:41

this is the script

 

#!/bin/sh
#PAUSE/PLAY
#
THIS COMMAND FOR PAUSE
======================
wget -q -O - http://127.0.0.1/web...rol?command=164 >/dev/null (COMMAND PAUSE/PLAY)


at this point I need a command that waits for me to press the same key or any other key to resume with play (next line)
PS. I tried the read command but it doesn't work

 
 
wget -q -O - http://127.0.0.1/web...rol?command=164 >/dev/null (COMMAND PAUSE/PLAY)



Re: help hotkey function #49 Pike_Bishop

  • Senior Member
  • 1,116 posts

+72
Good

Posted 16 October 2019 - 17:23

Hi,

 

 

I found out that the PPanel was missing

 

yes that's right, you want a example ok here a short one;

 

put a script with name memory_capacity.sh in the directory /usr/script, then make it executable with the following command;

chmod 755 /usr/script/memory_capacity.sh

the content of the script with name memory_capacity.sh looks as following;

#!/bin/sh

TMP=/tmp
READFILE=$TMP/memory_capacity.txt
rm -f $READFILE
df -h >> $READFILE &&

FESTPLATTEN_MOUNT="/media/hdd"
PLATTE="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $1}')"
SIZE_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $2}')"
USED_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $3}')"
AVAILABLE_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $4}')"
USED_IN_PERCENT_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $5}')"
MOUNTED_ON_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $6}')"

USBSTICK_MOUNT="/media/usb"
USBSTICK="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $1}')"
SIZE_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $2}')"
USED_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $3}')"
AVAILABLE_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $4}')"
USED_IN_PERCENT_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $5}')"
MOUNTED_ON_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $6}')"

UBI0_ROOTFS="/"
SIZE="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $2}')"
USED="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $3}')"
AVAILABLE="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $4}')"
USED_IN_PERCENT="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $5}')"
MOUNTED_ON="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $6}')"

#TMPFS="/dev$"
TMPFS="devtmpfs"
SIZE_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $2}')"
USED_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $3}')"
AVAILABLE_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $4}')"
USED_IN_PERCENT_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $5}')"
MOUNTED_ON_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $6}')"

TMPFS_2="/var/volatile"
SIZE_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $2}')"
USED_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $3}')"
AVAILABLE_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $4}')"
USED_IN_PERCENT_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $5}')"
MOUNTED_ON_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $6}')"

echo -e "\tFestplatte:"
echo -e "Platte:\t\t $PLATTE"
echo -e "Speicherplatz gesammt:\t $SIZE_0"
echo -e "Speicherplatz (frei):\t $AVAILABLE_0"
echo -e "Speicherplatz belegt:\t $USED_0"
echo -e "Speicherplatz belegt (%):\t $USED_IN_PERCENT_0"
echo -e "Gemountet nach:\t $MOUNTED_ON_0\n"

echo -e "\tUsb-Stick:"
echo -e "Stick:\t\t $USBSTICK"
echo -e "Speicherplatz gesammt:\t $SIZE_0_0"
echo -e "Speicherplatz (frei):\t $AVAILABLE_0_0"
echo -e "Speicherplatz belegt:\t $USED_0_0"
echo -e "Speicherplatz belegt (%):\t $USED_IN_PERCENT_0_0"
echo -e "Gemountet nach:\t $MOUNTED_ON_0_0\n"

echo -e "\tubi0:rootfs"
echo -e "Speicherplatz gesammt:\t $SIZE"
echo -e "Speicherplatz (frei):\t $AVAILABLE"
echo -e "Speicherplatz belegt:\t $USED"
echo -e "Speicherplatz belegt (%):\t $USED_IN_PERCENT"
echo -e "Gemountet nach:\t $MOUNTED_ON\n"

echo -e "\ttmpfs"
echo -e "Platz gesammt:\t\t $SIZE_1"
echo -e "Platz (frei):\t\t $AVAILABLE_1"
echo -e "Platz belegt:\t\t $USED_1"
echo -e "Platz belegt (%):\t\t $USED_IN_PERCENT_1"
echo -e "Gemountet nach:\t $MOUNTED_ON_1\n"

echo -e "\ttmpfs"
echo -e "Platz gesammt:\t\t $SIZE_2"
echo -e "Platz (frei):\t\t $AVAILABLE_2"
echo -e "Platz belegt:\t\t $USED_2"
echo -e "Platz belegt (%):\t\t $USED_IN_PERCENT_2"
echo -e "Gemountet nach:\t $MOUNTED_ON_2\n"


exit

and now you need in /etc/ppanel a file in this case with name my.xml with the following content;

<directory name="My PPanel">
	<execute name="Speicherplatz Anzeige" target="sh /usr/script/memory_capacity.sh" quit="exit"/>
	</directory>


and at last put the plugin ppanel to a button with hotkey if you want.

 

 

regards

Pike


Edited by Pike_Bishop, 16 October 2019 - 17:24.

Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: help hotkey function #50 zaccomass

  • Senior Member
  • 117 posts

0
Neutral

Posted 17 October 2019 - 08:48

Hi,

 

 

I found out that the PPanel was missing

 

yes that's right, you want a example ok here a short one;

 

put a script with name memory_capacity.sh in the directory /usr/script, then make it executable with the following command;

chmod 755 /usr/script/memory_capacity.sh

the content of the script with name memory_capacity.sh looks as following;

#!/bin/sh

TMP=/tmp
READFILE=$TMP/memory_capacity.txt
rm -f $READFILE
df -h >> $READFILE &&

FESTPLATTEN_MOUNT="/media/hdd"
PLATTE="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $1}')"
SIZE_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $2}')"
USED_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $3}')"
AVAILABLE_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $4}')"
USED_IN_PERCENT_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $5}')"
MOUNTED_ON_0="$(cat /tmp/memory_capacity.txt | grep -m1 "$FESTPLATTEN_MOUNT$" | awk '{print $6}')"

USBSTICK_MOUNT="/media/usb"
USBSTICK="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $1}')"
SIZE_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $2}')"
USED_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $3}')"
AVAILABLE_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $4}')"
USED_IN_PERCENT_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $5}')"
MOUNTED_ON_0_0="$(cat /tmp/memory_capacity.txt | grep "$USBSTICK_MOUNT$" | awk '{print $6}')"

UBI0_ROOTFS="/"
SIZE="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $2}')"
USED="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $3}')"
AVAILABLE="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $4}')"
USED_IN_PERCENT="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $5}')"
MOUNTED_ON="$(cat /tmp/memory_capacity.txt | grep "$UBI0_ROOTFS$" | awk '{print $6}')"

#TMPFS="/dev$"
TMPFS="devtmpfs"
SIZE_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $2}')"
USED_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $3}')"
AVAILABLE_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $4}')"
USED_IN_PERCENT_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $5}')"
MOUNTED_ON_1="$(cat /tmp/memory_capacity.txt | grep -m 1 "$TMPFS" | awk '{print $6}')"

TMPFS_2="/var/volatile"
SIZE_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $2}')"
USED_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $3}')"
AVAILABLE_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $4}')"
USED_IN_PERCENT_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $5}')"
MOUNTED_ON_2="$(cat /tmp/memory_capacity.txt | grep "$TMPFS_2" | awk '{print $6}')"

echo -e "\tFestplatte:"
echo -e "Platte:\t\t $PLATTE"
echo -e "Speicherplatz gesammt:\t $SIZE_0"
echo -e "Speicherplatz (frei):\t $AVAILABLE_0"
echo -e "Speicherplatz belegt:\t $USED_0"
echo -e "Speicherplatz belegt (%):\t $USED_IN_PERCENT_0"
echo -e "Gemountet nach:\t $MOUNTED_ON_0\n"

echo -e "\tUsb-Stick:"
echo -e "Stick:\t\t $USBSTICK"
echo -e "Speicherplatz gesammt:\t $SIZE_0_0"
echo -e "Speicherplatz (frei):\t $AVAILABLE_0_0"
echo -e "Speicherplatz belegt:\t $USED_0_0"
echo -e "Speicherplatz belegt (%):\t $USED_IN_PERCENT_0_0"
echo -e "Gemountet nach:\t $MOUNTED_ON_0_0\n"

echo -e "\tubi0:rootfs"
echo -e "Speicherplatz gesammt:\t $SIZE"
echo -e "Speicherplatz (frei):\t $AVAILABLE"
echo -e "Speicherplatz belegt:\t $USED"
echo -e "Speicherplatz belegt (%):\t $USED_IN_PERCENT"
echo -e "Gemountet nach:\t $MOUNTED_ON\n"

echo -e "\ttmpfs"
echo -e "Platz gesammt:\t\t $SIZE_1"
echo -e "Platz (frei):\t\t $AVAILABLE_1"
echo -e "Platz belegt:\t\t $USED_1"
echo -e "Platz belegt (%):\t\t $USED_IN_PERCENT_1"
echo -e "Gemountet nach:\t $MOUNTED_ON_1\n"

echo -e "\ttmpfs"
echo -e "Platz gesammt:\t\t $SIZE_2"
echo -e "Platz (frei):\t\t $AVAILABLE_2"
echo -e "Platz belegt:\t\t $USED_2"
echo -e "Platz belegt (%):\t\t $USED_IN_PERCENT_2"
echo -e "Gemountet nach:\t $MOUNTED_ON_2\n"


exit

and now you need in /etc/ppanel a file in this case with name my.xml with the following content;

<directory name="My PPanel">
	<execute name="Speicherplatz Anzeige" target="sh /usr/script/memory_capacity.sh" quit="exit"/>
	</directory>


and at last put the plugin ppanel to a button with hotkey if you want.

 

 

regards

Pike

Thanks very kind




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users