2023-04-29, 21:35
Hi
I'm trying to execute a script when pressing a button on the remote.
Kodi detects the keypress but doesn't execute the script
My script:
My keymap.
Kodi log showing I pressed the button 3 times:
https://paste.kodi.tv/ayijitepev.kodi
the intesting part is
If I execute the script from the shell with `/bin/sh /storage/bin/test.sh` it works fine.
How do I fix this?
Thanks
I'm trying to execute a script when pressing a button on the remote.
Kodi detects the keypress but doesn't execute the script
My script:
Code:
#!/bin/sh
/usr/bin/date >> /storage/.kodi/temp/test.txt
echo "TEST" >> /storage/.kodi/temp/test.txt
My keymap.
Code:
<keymap>
<loginscreen><keyboard>
<!-- leftmost red bar key -->
<key id="251">System.Exec(/storage/bin/test.sh)</key>
<!-- green bar key (next to red one) -->
<key id="252">System.Exec(/storage/bin/test.sh)</key>
</keyboard></loginscreen>
<global><keyboard>
<key id="50">contextmenu</key>
</keyboard></global>
<fullscreenvideo><keyboard>
<key id="44">cyclesubtitle</key>
</keyboard></fullscreenvideo>
<filemanager><keyboard>
<key id="50">contextmenu</key>
</keyboard></filemanager>
</keymap>
Kodi log showing I pressed the button 3 times:
https://paste.kodi.tv/ayijitepev.kodi
the intesting part is
Code:
2023-04-29 19:22:45.457 T:27288 debug <general>: PushCecKeypress - received key fb duration 0
2023-04-29 19:22:45.465 T:27263 debug <general>: HandleKey: 251 (0xfb, obc4) pressed, window 10029, action is System.Exec('/bin/sh /storage/bin/test.sh')
2023-04-29 19:22:45.797 T:27288 debug <general>: PushCecKeypress - received key fb duration 340
If I execute the script from the shell with `/bin/sh /storage/bin/test.sh` it works fine.
How do I fix this?
Thanks