Nice, the “Enabling“ part is working now, the working script is the following:
#!/bin/sh
rm /storage/.kodi/userdata/keymaps/keyboard.xml
sleep 1
kodi-send -a "Action(reloadkeymaps)"
sleep 1
kodi-send -a "Notification(Kodi Info,Keyboard Enabled,7000,http://powerpi.de/wp-content/uploads/powerpi/powerpi_ambi_thumb_off.jpg)"
</dev/null >/dev/null 2>&1 &
Now i have two keyboard.xml files, one is numb and the other is full.
The full is the exact copy of the /usr/share/kodi/system/keymaps/keyboard.xml plus the following entry:
<!-- PVR -->
<red>ActivateWindow(TVChannels)</red>
<green>ActivateWindow(Videos)</green>
<yellow>ActivateWindow(Music)</yellow>
<blue>XBMC.RunScript(/storage/.kodi/userdata/turnoff_keyboard.sh)</blue>
<!-- Multimedia keyboard keys -->
<browser_back>Back</browser_back>
The numb is the exact copy off vpeter file, only replacing my script:
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<global>
<keyboard>
<blue>XBMC.RunScript(/storage/.kodi/userdata/turnon_keyboard.sh)</blue>
<left></left>
<right></right>
<up></up>
<down></down>
<!-- and all other problematic keys -->
</keyboard>
</global>
</keymap>
Display More
However, when i press the blue button nothing happens
Here are the code of my two .sh scripts:
TurnOn:
#!/bin/sh
cp /storage/.kodi/userdata/bkpmaps/fullkeyboard.xml /storage/.kodi/userdata/keymaps/keyboard.xml
sleep 1
kodi-send -a "Action(reloadkeymaps)"
sleep 1
kodi-send -a "Notification(Kodi Info,Keyboard Enabled,7000,http://powerpi.de/wp-content/uploads/powerpi/powerpi_ambi_thumb_off.jpg)"
</dev/null >/dev/null 2>&1 &
TurnOff:
#!/bin/sh
cp /storage/.kodi/userdata/bkpmaps/numbkeyboard.xml /storage/.kodi/userdata/keymaps/keyboard.xml
kodi-send -a "Action(reloadkeymaps)"
sleep 1
kodi-send -a "Notification(Kodi Info,Keyboard Disabled,7000,http://powerpi.de/wp-content/uploads/powerpi/powerpi_ambi_thumb_off.jpg)"
</dev/null >/dev/null 2>&1 &
I think im next to my final goal but still missing something