LE9.0 remote configs ir-keytable Amlogic devices

  • Can anyone point me in the direction where the key functions are saved? (The file where KEY_POWER, KEY_UP, KEY_1 etc are defined) as I'm going to make new functions which run specific commands.

    Thanks in advance:)

    Update: I just found out as it was in the first post by Kostaman.

  • You can disable the Linux event -> lirc event translation, eg by creating an empty eventlircd udev rule: Code
    : > /storage/.config/udev.rules.d/98-eventlircd.rules

    then the remote buttons/keys reach kodi like standard keyboard input.


    There's one drawback though: kodi currently can't deal with a lot of keycodes used on remotes

    Hi there, I have used this method to create a keymap with longpress mode, however, I had an issue with key Stop. Even though I put KEY_STOP in remote rc_maps file, but there is nothing happen when I press it in the playing movie. Anyone else experience this kind of error?

    When I stop the kodi and monitoring the key being press, it still recognise that as a KEY_STOP pressed. I'm using the latest LE9.0 in this thread: Test LibreELEC images with KODI-18 for S9xxx

  • That file is going to be look like this:

    For all the command/function, you can have a look here: linuxinputdevices.cpp

  • That file is going to be look like this:

    Code
    # table your_device_name, type: NEC
    0x804d KEY_MUTE
    0x8056 KEY_VOLUMEDOWN
    0x804e KEY_VOLUMEUP
    0x8025 KEY_LEFT
    ....

    Thanks for that...got it all working ok, but I need to find out how to define the keys I have circled.

    eg: just guessing, would the mouse key be KEY_MOUSE ? and the others?

  • I just assume it will work, normally I'll test first but I'm away so... please let me know the result ;)

    (1) Menu button (2) Mouse button
    KEY_MENU KEY_F5 or KEY_FN
    (3) Search button (4) Del <-- button (tested)
    KEY_SEARCH KEY_BACKSPACE

    Edited once, last by White (August 10, 2018 at 9:27 AM).

  • I just assume it will work, normally I'll test first but I'm away so... please let me know the result ;)

    (1) Menu button works - pops up context-menu

    (2) Mouse button does nothing (tried F5 and FN)

    (3) Search does nothing

    (4) Del <--- works but only acts like a back key (goes back to previous menu)...even when used while typing text.

    I think I'm happy with the remote and the few non-working keys are no big deal.

    Thanks for your help.

  • senzalice, you can assign any function you want to a key on the remote. In my example, I've assigned several handy functions to the mouse key, the number keys etc on my remote. There are more information at Kodi's forum regarding the different key functions I've listed below.

  • senzalice, you can assign any function you want to a key on the remote. In my example, I've assigned several handy functions to the mouse key, the number keys etc on my remote. There are more information at Kodi's forum regarding the different key functions I've listed below.

    Thanks for the codes list @CI6N0Z, very handy, but unfortunately I could not get any to work.

    The three keys mentioned previously, the mouse, the DEL and search, would be nice if I could assign the letters "O" , "Z" and "I"

    During any video playback, "O" gives codec info of source video, "Z" gives playback info like fps, aspect ratio, resolution...and "I" gives info about the video.

    I even tried assigning the letters "O" , "Z" and "I" to numbers 1, 2, and 3 but no luck.

    You mentioned "In my example, I've assigned several handy functions to the mouse key"....sorry, but where is the example?

    Here is my remote table:

    # table M8SPRO, type: NEC

    0x0f KEY_NUMERIC_0

    0x52 KEY_NUMERIC_1

    0x50 KEY_NUMERIC_2

    0x10 KEY_NUMERIC_3

    0x56 KEY_NUMERIC_4

    0x54 KEY_NUMERIC_5

    0x14 KEY_NUMERIC_6

    0x4e KEY_NUMERIC_7

    0x4c KEY_NUMERIC_8

    0x0c KEY_NUMERIC_9

    0x1a KEY_ENTER

    0x06 KEY_UP

    0x16 KEY_DOWN

    0x5a KEY_LEFT

    0x1b KEY_RIGHT

    0x45 KEY_MENU

    0x05 KEY_BACK

    0x13 KEY_VOLUMEUP

    0x17 KEY_VOLUMEDOWN

    0x0b KEY_NEXT

    0x08 KEY_PREVIOUS

    0x59 KEY_POWER

    0x0d KEY_HOME # home

    0x12 KEY_O # mouse

    0x51 KEY_Z # DEL

    0x19 KEY_MUTE

    0x22 KEY_I # Search

  • Well, I meant "In my case, I've assigned several handy functions to different keys". Mostly own commands to make sure the remote power-off button quit Kodi before shutdown, enable 444,10bit before playback, fix banding issues during playback if present, enable 444,8bit etc. However, you should be able to assign any function you want to a button on the remote.


    Take button 1 on the remote as an example. The code for button 1 is "0x52" and you can assign the function KEY_POWER to the remote button with

    0x52 KEY_POWER

    Here is another example

    0x12 KEY_CONTEXT_MENU # Context menu instead of KEY_MOUSE

    Remember that you have to load your config, restart Kodi and eventlircd to test your changes.

  • Take button 1 on the remote as an example. The code for button 1 is "0x52" and you can assign the function KEY_POWER to the remote button with

    0x52 KEY_POWER

    OK, thanks for the explanation.

    I took your example above and assigned KEY_POWER to button 1 as 0x52 KEY_POWER

    After restarting Kodi, it worked, button 1 switched off the box.

    However, I would actually like to assign (for example) the letter "O" to button 1, so I re-wrote it as...

    0x52 KEY_O

    After restarting Kodi, button 1 does nothing. Any ideas why its not working?

    (the letter "O" brings up codec info on screen during video playback.)

  • However, I would actually like to assign (for example) the letter "O" to button 1, so I re-wrote it as...

    0x52 KEY_O

    After restarting Kodi, button 1 does nothing. Any ideas why its not working?

    (the letter "O" brings up codec info on screen during video playback.)

    Unfortunately not, as it worked for me with LibreELEC 8.2.3.1. I've not tested it with LibreELEC 9 (or CoreELEC) yet... So, I recommend that you search more at Kodi's forum or simply Google it.


    One theory is that i'ts deactivated on low powered devices as it will reduce performance when used (Codecinfo - Official Kodi Wiki)

  • Log in to your box using ssh, and then run this command:

    Code
    : > /storage/.config/udev.rules.d/98-eventlircd.rules

    Restart Kodi, eventlircd, or reboot the box just for sure ;) That's it. It will work.

    Unfortunately not, as it worked for me with LibreELEC 8.2.3.1.

    LE 8 using another way to deal with remote, which is file remote.conf file. And that easier to config than rc_keymaps file, at least in my opinion (Leia still in development so not expect to be perfect).

  • Log in to your box using ssh, and then run this command:

    Code
    : > /storage/.config/udev.rules.d/98-eventlircd.rules

    Restart Kodi, eventlircd, or reboot the box just for sure ;) That's it. It will work.

    @White...thank you so much, it worked.

    Problem solved :)