I created my custom rc_keymap:
Code
# table mxq, type: NEC
0x140 KEY_POWER
0x1f1 KEY_S
0x1f2 KEY_PLAYPAUSE
0x1f3 KEY_STOP
0x1f4 KEY_F
0x1f5 KEY_R
0x14b KEY_PREVIOUSSONG
0x10f KEY_I
0x118 KEY_VOLUMEUP
0x14f KEY_NEXTSONG
0x143 KEY_O
0x110 KEY_VOLUMEDOWN
0x111 KEY_HOMEPAGE
0x116 KEY_UP
0x119 KEY_ESC
0x151 KEY_LEFT
0x113 KEY_ENTER
0x150 KEY_RIGHT
0x14c KEY_E
0x11a KEY_DOWN
0x100 KEY_C
0x14e KEY_1
0x10d KEY_2
0x10c KEY_3
0x14a KEY_4
0x109 KEY_5
0x108 KEY_6
0x146 KEY_7
0x105 KEY_8
0x104 KEY_9
0x141 KEY_MUTE
0x101 KEY_0
0x142 KEY_BACKSPACE
Display More
and I noticed this does not work as I wanted. Most keys are fine, but some others, don't. For example, KEY_E (in kodi it shows epg) ignored. Then I realized my approach is wrong, I am limited to keys defined in usr/share/kodi/system/Lircmap.xml:
Code
<remote device="devinput">
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<up>KEY_UP</up>
<down>KEY_DOWN</down>
<select>KEY_OK</select>
<select>KEY_ENTER</select>
<select>KEY_KPENTER</select>
<select>KEY_SELECT</select>
<clear>KEY_DELETE</clear>
<clear>KEY_ESC</clear>
<start>KEY_MEDIA</start>
<start>KEY_HOME</start>
<back>KEY_EXIT</back>
<back>KEY_BACK</back>
<back>KEY_BACKSPACE</back>
<back>KEY_ESC</back>
<back>KEY_E</back>
<record>KEY_RECORD</record>
<play>KEY_PLAY</play>
<play>KEY_PLAYPAUSE</play>
<pause>KEY_PAUSE</pause>
<stop>KEY_STOP</stop>
<stop>KEY_STOPCD</stop>
<forward>KEY_FASTFORWARD</forward>
<forward>KEY_FFORWARD</forward>
<forward>KEY_FORWARD</forward>
<reverse>KEY_REWIND</reverse>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeplus>KEY_VOLUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
<volumeminus>KEY_VOLDOWN</volumeminus>
<pageplus>KEY_CHANNELUP</pageplus>
<pageplus>KEY_CHUP</pageplus>
<pageplus>KEY_PAGEUP</pageplus>
<pageminus>KEY_CHANNELDOWN</pageminus>
<pageminus>KEY_CHDOWN</pageminus>
<pageminus>KEY_PAGEDOWN</pageminus>
<skipplus>KEY_NEXT</skipplus>
<skipplus>KEY_NEXTSONG</skipplus>
<skipminus>KEY_PREVIOUS</skipminus>
<skipminus>KEY_PREVIOUSSONG</skipminus>
<guide>KEY_EPG</guide>
<title>KEY_TITLE</title>
<title>KEY_TV2</title>
<title>KEY_CONTEXT_MENU</title>
<subtitle>KEY_SUBTITLE</subtitle>
<subtitle>KEY_TITLE</subtitle>
<language>KEY_LANGUAGE</language>
<info>KEY_INFO</info>
<info>KEY_PROPS</info>
<display>KEY_ZOOM</display>
<display>KEY_ANGLE</display>
<mute>KEY_MUTE</mute>
<power>KEY_POWER</power>
<power>KEY_SLEEP</power>
<power>KEY_WAKEUP</power>
<eject>KEY_EJECTCD</eject>
<eject>KEY_EJECTCLOSECD</eject>
<menu>KEY_DVD</menu>
<menu>KEY_MENU</menu>
<myvideo>KEY_VIDEO</myvideo>
<mymusic>KEY_AUDIO</mymusic>
<mymusic>KEY_MP3</mymusic>
<mypictures>KEY_CAMERA</mypictures>
<mypictures>KEY_IMAGES</mypictures>
<livetv>KEY_TUNER</livetv>
<mytv>KEY_TV</mytv>
<mytv>KEY_PVR</mytv>
<teletext>KEY_TEXT</teletext>
<one>KEY_1</one>
<one>KEY_NUMERIC_1</one>
<two>KEY_2</two>
<two>KEY_NUMERIC_2</two>
<three>KEY_3</three>
<three>KEY_NUMERIC_3</three>
<four>KEY_4</four>
<four>KEY_NUMERIC_4</four>
<five>KEY_5</five>
<five>KEY_NUMERIC_5</five>
<six>KEY_6</six>
<six>KEY_NUMERIC_6</six>
<seven>KEY_7</seven>
<seven>KEY_NUMERIC_7</seven>
<eight>KEY_8</eight>
<eight>KEY_NUMERIC_8</eight>
<nine>KEY_9</nine>
<nine>KEY_NUMERIC_9</nine>
<zero>KEY_0</zero>
<zero>KEY_NUMERIC_0</zero>
<star>KEY_STAR</star>
<star>KEY_KPASTERISK</star>
<star>KEY_NUMERIC_STAR</star>
<hash>KEY_POUND</hash>
<hash>KEY_NUMERIC_POUND</hash>
<red>KEY_RED</red>
<green>KEY_GREEN</green>
<yellow>KEY_YELLOW</yellow>
<blue>KEY_BLUE</blue>
<recordedtv>KEY_PVR</recordedtv>
<liveradio>KEY_RADIO</liveradio>
</remote>
Display More
As KEY_E is not defined and there is no any action to show epg linked to any other key, this is reason why it does not work. My question: what is simplest way to map specific scan code to action that will show epg (E press on physical keyboard equivalent), S (shutdown menu), I (info), O (extended info) etc?
[edit]
Ok, key epg is available (I missed that), but still how to define custom actions?