Hello, I am not shore if this is right place where to post, but here it goes.
I had a problem that I wanted my MCE remote Power button on Libreelec RPI3 Kodi 18, to turn off screen (HDMI) but keep running for samba, transmission etc.
If kids accidentally pressed MCE power button system was powered off.
So what I did:
1. Install Power Display screen saver - http://github.com/asavah/script.pidisplaypower
2. Select Power Display as active screen saver
3. Install Key Map Editor addon http://kodi.wiki/view/Add-on:Keymap_Editor
4. Edit some key and save (so gen.xml file is created)
5. Modify gen.xml (you can access it via Libreelec Samba) by deleting all that was saved in userdata/keymaps/gen.xml and copying this in gen.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<!-- The <global> section is a fall through - they will only be used if the button is not -->
<!-- used in the current window's section. Note that there is only handling -->
<!-- for a single action per button at this stage. -->
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox -->
<!-- gamepads. -->
<!-- The format is: -->
<!-- <device> -->
<!-- <button>action</button> -->
<!-- </device> -->
<!-- To map keys from other remotes using the RCA protocol, you may add <universalremote> blocks -->
<!-- In this case, the tags used are <obc#> where # is the original button code (OBC) of the key -->
<!-- You set it up by adding a <universalremote> block to the window or <global> section: -->
<!-- <universalremote> -->
<!-- <obc45>Stop</obc45> -->
<!-- </universalremote> -->
<!-- Note that the action can be a built-in function. -->
<!-- eg <B>ActivateWindow(MyMusic)</B> -->
<!-- would automatically go to My Music on the press of the B button. -->
<keymap>
<global>
<remote>
<play>PlayPause</play>
<pause>Pause</pause>
<stop>Stop</stop>
<forward>FastForward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Select</select>
<pageplus>PageUp</pageplus>
<pageminus>PageDown</pageminus>
<back>PreviousMenu</back>
<dvdmenu>PlayDVD</dvdmenu>
<info>ContextMenu</info>
<skip>StepForward</skip>
<replay>StepBackward</replay>
<record>Record</record>
<volumeplus>VolumeUp</volumeplus>
<volumeminus>VolumeDown</volumeminus>
<mute>Mute</mute>
<power>ActivateScreensaver</power>
<myvideo>ActivateWindow(MyVideos)</myvideo>
<mymusic>ActivateWindow(RadioChannels)</mymusic>
<mypictures>Screensaver</mypictures>
<mytv>FullScreenVideo</mytv>
<guide>ActivateWindow(TVGuide)</guide>
<livetv>ActivateWindow(TVChannels)</livetv>
<recordedtv>ActivateWindow(TVRecordings)</recordedtv>
<red>Red</red>
<green>Green</green>
<yellow>Yellow</yellow>
<blue>Blue</blue>
<zero>Number0</zero>
<one>Number1</one>
<two>Number2</two>
<three>Number3</three>
<four>Number4</four>
<five>Number5</five>
<six>Number6</six>
<seven>Number7</seven>
<eight>Number8</eight>
<nine>Number9</nine>
<clear>Delete</clear>
<enter>Enter</enter>
<thegreenbutton>ActivateWindow(Home)</thegreenbutton>
<teletext>info</teletext>
</remote>
</global>
<FullscreenVideo>
<remote>
<left>StepBack</left>
<right>StepForward</right>
<mytv>CodecInfo</mytv>
<star>NextSubtitle</star>
<hash>AudioNextLanguage</hash>
</remote>
</FullscreenVideo>
<Visualisation>
<remote>
<left>PreviousPreset</left>
<right>NextPreset</right>
<up>IncreaseRating</up>
<down>DecreaseRating</down>
<back>Back</back>
<title>CodecInfo</title>
<select>ActivateWindow(VisualisationPresetList)</select>
<menu>OSD</menu>
<contentsmenu>OSD</contentsmenu>
<rootmenu>OSD</rootmenu>
<start>OSD</start>
<info>Info</info>
<guide>ActivateWindow(PVROSDGuide)</guide>
<playlist>ActivateWindow(PVROSDChannels)</playlist>
</remote>
</Visualisation>
<VirtualKeyboard>
<remote>
<clear>BackSpace</clear>
<star>Shift</star>
<hash>Symbols</hash>
<zero>Number0</zero>
<one>Number1</one>
<two>Number2</two>
<three>Number3</three>
<four>Number4</four>
<five>Number5</five>
<six>Number6</six>
<seven>Number7</seven>
<eight>Number8</eight>
<nine>Number9</nine>
<enter>Enter</enter>
<left>CursorLeft</left>
<right>CursorRight</right>
</remote>
</VirtualKeyboard>
<NumericInput>
<remote>
<zero>Number0</zero>
<one>Number1</one>
<two>Number2</two>
<three>Number3</three>
<four>Number4</four>
<five>Number5</five>
<six>Number6</six>
<seven>Number7</seven>
<eight>Number8</eight>
<nine>Number9</nine>
<enter>Enter</enter>
<clear>BackSpace</clear>
</remote>
</NumericInput>
<Teletext>
<remote>
<teletext>Back</teletext>
</remote>
</Teletext>
<FullscreenLiveTV>
<remote>
<left>StepBack</left>
<right>StepForward</right>
<up>ChannelUp</up>
<down>ChannelDown</down>
<pageplus>ChannelUp</pageplus>
<pageminus>ChannelDown</pageminus>
<star>NextSubtitle</star>
<hash>AudioNextLanguage</hash>
<teletext>ActivateWindow(Teletext)</teletext>
</remote>
</FullscreenLiveTV>
<FullscreenRadio>
<remote>
<left>StepBack</left>
<right>StepForward</right>
<up>ChannelUp</up>
<down>ChannelDown</down>
</remote>
</FullscreenRadio>
</keymap>
Display More
6. Save changes
7. Reboot and all works as it should
A lot of credit goes to Power Display screen saver and friendly OSCM forum post - OSCM post by user baloan
Hope it helps to other RPI Libreelec users!