Which keycodes are available to use? (KEY_PROG1, KEY_F13 etc don't work)

Hi

I could not get some (many in fact) keycodes working in the meson-ir config. They are: KEY_PROG1KEY_PROG2, …, KEY_F13KEY_F24, KEY_SETUP, KEY_O etc

My system is CoreELEC-Amlogic-ng.arm-19.2-Matrix_rc2-Generic

ir-keytable reads them, the codes are seen with ir-keytable -v and also ir-keytable -t shows them properly when pressed but it’s all

First, I tried to simply configure the remote button as the hardware button ‘O’ (Player process info) and wrote 0x57 = “KEY_O” but it’s no use, player doesn’t react at it. Then I tried to set it to KEY_PROG1 and redefine in Keymap Editor - no luck, the same. The Keymap Editor pretends to catch the button (“press the button in 5 sec” dismisses) but doesn’t redefine the rule as though the code were empty

The Keymap Editor sees the button when I define it, for examole, as KEY_GREEN in MYREMOTE.toml but this definition has side effects, that’s why I’d prefer to use KEY_PROG1 etc. So it seems like that only some of the keycodes can be used in the toml. So the questions are:

  1. Where can I get the full list of the codes available to use in the meson-ir remote config?
  2. Why KEY_O and the other KEY_* don’t work? More exact, they work in ir-keytable but no further

And:

https://kodi.wiki/view/Add-on:Keymap_Editor

https://kodi.wiki/view/Keymap

The links to the docs are helpful, of course, but the trouble is that Keymap Editor accepts not all codes from “input-event-codes.h” (even after I read the docs yet again). I get the different results with the different codes. Some work but others don’t

I asked on the local forum, nobody helped out but at least one guy had the same issue, then I decided to ask here

Of course, I could not check every code from the bunch, but, for example, KEY_GREEN behave absolutely not the same way as, for other example, KEY_F13 (or KEY_PROG1, KEY_PROG2)

Steps to reproduce:

  1. ir-keytable -t - ok, the proper codes are shown when the buttons are pressed
  2. overriding KEY_GREEN - ok, the rule is being changed at once and then being written to /storage/.kodi/userdata/keymaps/gen.xml on “Save”
  3. overriding KEY_F13 or KEY_PROG1 - the countdown 5sec message dismisses but the rule (the same one as in previous step, it’s important) stays unchanged. And gen.xml stays the same on “Save”, too

Here we are, almost by Orwell: all codes are equal, but some codes are more equal than others

These codes work (got it on this page), but the others don’t, at least that I tried

The main issue is that even though you can use valid linux key’s defined in kernel, the Mediacenter doesn’t know all of them. To complicate things further CE is using eventlircd that is mapping keyboard events to IR keys to please the media center. You could remove eventlird and your remote will act like a real keyboard but you will have to remap some keys.

systemctl mask eventlircd

But something is passed though to the final events receiver (i.e. keymap editor). It’s seen from that the countdown breaks just after remote button is pressed. Nevermind, it’s only “ah if would…”. The things are done as they’re done

Well. let’s forget for a while all these event handler chain complexness. Is there the full IR remote codes list available for the reassignment in Keymap Editor? The codes that are not ignored by it and preferrably aren’t used already. For it would be a headache to catch the unwanted actions. PROG1…4 and F13…24 would be perfect but… I just want to map the multiple unused buttons on my rather huge remote to anything useful. So the well number of vacant codes is needed

So far I found by myself IRTranslator.cpp and /usr/share/kodi/system/keymaps/remote.xml but have no idea how to get what I need from them

===================

P.S. Seemed to find anything

Kodi translates the received LIRC events to Kodi button names via Lircmap.xml and then buttons are mapped to Kodi actions via remote.xml and keyboard.xml files

and, in LIRC

Customized buttons are for people who require more buttons than are defined by default. For example;
<obc1>BUTTON1</obc1>

<obc254>BUTTON254</obc254>

This is it? If so, then where Lircmap.xml should be put? In /storage/.config/ or where?

Can you try with following combination:

A clean install (never a problem with CoreELEC since it boots from external media);
A standard remote configuration file (pick any that works the remote repo);
The the Kodi Keymap editor (this is where the magic should happen).

Thanks.

I already have “any that works” remote configuration: Play/Pause/arrows/Enter work. So the Kodi Keymap Editor that does the part of that I need. But it woukd be fine to force it do the things it doesn’t want to do

The remote is completely alien for the mediacenter box and also completely noname and outdated. It’s from ancient DVD or maybe even VCR player. But it’s gorgeous because it has many buttons so I want to program them

I hope right now I understood partly what’s happening. It’s the typical “Universal Remote”, so I (maybe) need the OBC codes (maybe no). Anyway, now the question is: how to make the custom Lircmap.xml?

What the right path is? /storage/.config or /storage/.kodi or what?
Does it override or complement the original lircmap?

Glad you asked:

https://kodi.wiki/view/LIRC

https://kodi.wiki/view/HOW-TO:Set_up_LIRC

and

https://www.lirc.org/html/configuration-guide.html

Glad you answered. Now it’s finally… still not working

The Keymap Editor - whatever. I can’t get it working with the non-standard buttons (we’ll see below they are all obc255 by all means) and let them. Now I try to do the things manually. But… see the previous paragraph

=== part of /storage/.config/rc_keymaps/NOVEX.toml
it just works, no questions at all
http://ix.io/3tyF

=== full current content of /storage/.kodi/userdata/keymaps/gen.xml
the keymap editor’s file was manually edited and of course obcXXX buttons don’t work while the others work
http://ix.io/3tyG

But let’s look into /storage/.kodi/userdata/Lircmap.xml. I think it’s the most tricky part and I suspect the problem is here but not sure of course
http://ix.io/3tyM

First, the docs are not obvious:

Copy the part between

<remote device=“mceusb”> … </remote>

and paste it in the file. Change the new mceusb to MyRemote (or whatever name you picked for your remote in the lirc configuration

The question is: what picked name? But I created all three sections: mceusb, novex and NOVEX. They are all being loaded, we see it in logs. I hope my custom mceusb section overrides the original one but who knows… I refedined there the couple of buttons but saw no difference. Probably I’m doing wrong

grep -i remote /storage/.kodi/temp/kodi.log |paste
http://ix.io/3tyH

All was in vain, the buttons didn’t work. Not worth mentioning that Keymap Editor don’t see them, naturally

=== The debugging log for these buttons: RED is ok but the others are obc255 while their lirc codes are ok. Why?
http://ix.io/3tyY

So, where I’ve mistaken?

About | FAQ | Terms of Service | Privacy Policy | Legal Notice