NEW Repo for Remote files (Thanks to Betatester)

Just remove /storage/.config/rc_maps.cfg and reboot.

Hello,

I want to modify thw remote keya to execute some scripts. For example, I want to use the POWER key to execute ā€œ/storage/cecpower.shā€ script.

How could I configure this?

Regards.

1 Like

Hi. I have a working Kodi 17.6 remote setup under LibreELEC on my Mini M8S II media box, using a fairly heavily custom configured remote.conf file which took a long time to get working exactly the way I wanted with my XSight Touch universal remote and a modified harmony code set. I also use a Kodi gen.xml file in /storage/.kodi/userdata/keymaps/ for further tweaking.

I assumed from the info above that all I would need to do for CoreELEC (for Kodi 18) would be to copy my working remote.conf file into /storage/.config/rc_keymaps/ and create an rc_maps.cfg file in /storage/.config/ containing ā€œmeson-ir * remote.confā€. However I now think I was maybe being a bit optimistic that anyone would make it that easy for me. :frowning:

Obviously I donā€™t want to spend hours on hours of extra work recreating all the code sequences that I have already done, so any suggestions on how to get it working (or even how to get the little supplied remote working, as that doesnā€™t seem to work either)? Many thanks.

Andre

I somehow seem to have lost the recent couple of replies in this thread, the last now seems to be my message of last night? Odd.

Anyway, as advised in those missing messages, I have created an MCE codeset in my XSight Touch remote, and removed my trial rc_maps.cfg and related files from CoreELEC, and after a reboot the media player is responding to basic remote commands fine. So now all I need to do is tweak a few of the more specific button presses to generate my required customised Kodi functions.

Is there an existing mapping file that I should edit to adjust the out-of-the-box MCE functionality (there doesnā€™t seem to be one contained in the Dropbox repository at NEW Repo for Remote files (Thanks to Betatester)), or do I have to build a new one from scratch as above?

Andre

As far as I am aware, unless itā€™s in the repo, then you will need to configure this yourself.
Or hope someone else replies

You could install the ā€œKeymap Editorā€ addon to adjust the functions of your remote keys.

I have tried using this addon but it appears it needs to be updated a bit as the remote keys donā€™t function as they should using it. Even though in the debug log it shows that the action is correct

Last time I tried this addon, it was working flawless for me, but to be honest itā€™s some months ago.
You could also try to manually edit your xml files:
https://kodi.wiki/view/Keymap

It worked fine when I used it a couple of days ago to change some keys with the latest nightly.

Thanks for the help earlier, Iā€™ve now programmed an MCE command set into my universal remote, and thatā€™s working fine to control the Mini M8S, so I just need to tweak a couple of minor key mappings now.

To check what the remoteā€™s key codes are being mapped to, I installed the Kodi Keymap Editor addon and that seems to be doing its job by creating new content in a gen.xml file (in /storage/.kodi/userdata/keymaps) when I modify a key mapping. So far so good, and with a bit of manual editing Iā€™ve successfully changed the ā€˜Guideā€™ button to a Home function, using <keyboard><key id="50">activatewindow(home)</key></keyboard>.

However both the Play and the Pause buttons on my remote control seem to be somehow creating the same key mapping (number 230) when I test them in Kodi. My remote control is definitely sending two separate IR code sequences (EFC:130 OBC:22 for Play, and EFC:210 OBC:24 for Pause) but something within the CoreELEC re-mapping seems to be converting them into the same keyboard event (230) as far as Kodi is concerned. Any thoughts on how I separate just these two keys?

Andre

Iā€™ve just run an ir-keytable scan, and the results do correctly show different values received for the Play and Pause buttons - so I wonder why Kodi is receiving both presses as the same keyboard event (230)?

MiniM8SII-CoreELEC:~ # ir-keytable -t
Testing events. Please, press CTRL-C to abort.
79922.337860: event type EV_MSC(0x04): scancode = 0x800f0416
79922.337860: event type EV_KEY(0x01) key_down: KEY_PLAY(0x00cf)
79922.337860: event type EV_SYN(0x00).
79922.490324: event type EV_MSC(0x04): scancode = 0x800f0416
79922.490324: event type EV_SYN(0x00).
79922.740133: event type EV_KEY(0x01) key_up: KEY_PLAY(0x00cf)
79922.740133: event type EV_SYN(0x00).
79924.583546: event type EV_MSC(0x04): scancode = 0x800f0418
79924.583546: event type EV_KEY(0x01) key_down: KEY_PAUSE(0x0077)
79924.583546: event type EV_SYN(0x00).
79924.740211: event type EV_MSC(0x04): scancode = 0x800f0418
79924.740211: event type EV_SYN(0x00).
79924.990113: event type EV_KEY(0x01) key_up: KEY_PAUSE(0x0077)
79924.990113: event type EV_SYN(0x00).

Edit: Iā€™ve also done an ir-keytable -r which I think gives me the entire currently active scancode list from CoreELEC, yes? I so, could I just copy that entire list into a new file in rc_keymaps (reformatted suitably) and then redirect the KEY_PLAY and KEY_PAUSE scancodes to some random unused KEY_**** functions which I could then handle separately within Kodi? A bit of a faff, but should it work?

Andre

Yes, this is what I have been telling you all alongā€¦ there is no need to remap them inside Kodi though with gen.xml or by using Keymap Editor.

The only reason you would need to use gen.xml or whatever is if there is no suitable KEY_**** for whatever function you want.

Perhaps it is my box then. Wetek Play 2. I have upgraded to the 31st Nightly I shall try editing it now.

Has something changed from the stable to nightly build in terms of how it interprets ir compared to the stable build?

To my knowledge nothing has been changed regarding ir functionality

Wetek Play 2: Has anyone a working IR remote control configuration, where the long press opens the menu?

Since using CoreElec I use the menu button instead, but it was a nice feature in LibreElec 8.x.

You can see an example for X92 remote with long press buttons

The problem Iā€™m still having is that although the default CoreELEC key mapping layout for the Pause and Play buttons on my MCE remote seems to correctly create KEY_PLAY and KEY_PAUSE events from the two scancodes (Iā€™ve checked with ir-keytable, see previous post), Kodi itself sees both button presses as the same keyboard letter ā€œpā€, rather than as two separate buttons. Even if I go into the Kodi Keymap Editor Addon, both the KEY_PLAY and KEY_PAUSE buttons create the same result (i.e. PLAYPAUSE).

What I want to do is create discrete PLAY and PAUSE functions, rather than only having the option to toggle.

Andre

I donā€™t see the problem with both KEYā€™s being recognised as PLAY/PAUSE, nevertheless if you want to bind them differently then you will have to create a custom gen.xml mapping as you have in the past for those 2 buttons.

I just like my keys to do what they say on the tin - a ā€œPlayā€ button should always play (and not pause) and a ā€œPauseā€ button should always pause (and not restart playback if you press it a second time by accident).

However Iā€™m still not sure how I can actually use gen.xml when the code being sent to Kodi for both the KEY_PLAY and KEY_PAUSE button events is the same (230) even though CoreELEC is detecting separate button presses. Can I use those actual key names in the gen.xml, file, rather than the numbers which Kodi seems to insert (e.g. KEY_PLAY or KEY_PAUSE instead of 230)?

Andre

For the benefit of anyone else following this thread, I used Kodiā€™s debug logging to see what it was doing with the missing KEY_PLAY event, and found it was mapping it to id=234 (0xEA) which for some reason the Kodi Keymap Editor addon was then ignoring completely:

13:04:16.077 T:4011844464   DEBUG: LIRC: - NEW cf 0 KEY_PLAY devinput (KEY_PLAY)
13:04:16.105 T:4088856496   DEBUG: HandleKey: homepage (0xea) pressed, action is PlayPause
13:04:17.889 T:4011844464   DEBUG: LIRC: - NEW 77 0 KEY_PAUSE devinput (KEY_PAUSE)
13:04:17.896 T:4088856496   DEBUG: HandleKey: blue (0xe6) pressed, action is Pause

So I manually edited the gen.xml file to <key id="234">play</key> and that works fine now. Itā€™s just a shame that Kodi apparently does not handle the Pause key correctly though, treating even the discrete key as a PLAYPAUSE event. Oh well, at least my Play button is now discrete anyway.

Thanks for the help and advice here.

Andre