Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Kodi with ir-keytable (without lirc) not working correctly
#1
Hi,

I've a media center PC running a minimal installation of Ubuntu 17.04 and Kodi (started as systemd service with xinit).

Everything is working, except for my IR remote. Some buttons like up/down/left/right/play/back are recognised, but other buttons like stop, info and the number buttons are not recognised.

ir-keytable -t outputs the correct keys like KEY_OK, KEY_LEFT, KEY_STOP, KEY_CONTEXT_MENU or KEY_NUMERIC_1. I've already tried to remap some buttons to KEY_1, KEY_I, etc. but that didn't help either.

I'm using a imon-pad remote receiver with a Logitech Harmony which worked with LibreELEC before.

ir-keytable outputs the following:

Code:
Found /sys/class/rc/rc0/ (/dev/input/event12) with:
    Driver imon, table rc-imon-pad
    Supported protocols: other rc-6
    Enabled protocols: other
    Name: iMON Remote (15c2:0036)
    bus: 3, vendor/product: 15c2:0036, version: 0x0003
    Repeat delay = 500 ms, repeat period = 125 ms

Am I missing something?
Reply
#2
Kodi doesn't work too well with linux input events and also xorg could be "swallowing" some of your keycodes.
See for example this ticket: https://trac.kodi.tv/ticket/15797

You can workaround that with a custom keymap, reassigning the non-working keys to supported keycodes (eg KEY_OK to KEY_ENTER).
See eg here: http://forum.kodi.tv/showthread.php?tid=...pid2585224

so long,

Hias
Reply
#3
So, is using lirc instead of ir-keytable the better solution? But I've already heard about lirc being the old way of letting applications use IR remotes.

If I should stick with ir-keytable, what are supported keycodes for the numeric keys if keys like KEY_NUMERIC_1 and KEY_1 are not working?
Reply
#4
Numeric keys not working is new to me. Just tested on my Debian Jessie box and KEY_1 showed up as a standard "1" in xev.

Could you check with xev as well? If the button presses show up with ir-keytable -t or evtest but not in xev xorg's input mapping is probably to blame.

Other than that: kodi's remote handling is still focussed on lirc. So you have to use eg lircd in devinput mode to translate the linux input events into lirc events. I hope this'll change some time, native input event handling in kodi would make things a lot easier.

so long,

Hias
Reply
#5
You should not run Kodi without a window manager. that is not suported and only works by chance. Load ir-keytable in startup script of your WM, i.e. fluxbox or openbox. Then start Kodi.
Test with xev, that is what Kodi sees as well.
Reply
#6
So the key events might be missing because I'm running Kodi directly as a systemd service?

Could using LightDM with OpenBox be a better solution? i.e. auto login in LightDM, start OpenBox session which then starts Kodi.
Reply
#7
You can use systemd but you should fire up a WM like this:
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/openbox-session -- :0 -nolisten tcp vt7
Reply
#8
I've tried it by starting Kodi in OpenBox and I can see event in the console where I started "xev", but not for all buttons.

The numeric buttons on my IR remote show an event in "ir-keytable -t" but not in "xev". But I can see an event for the stop in both tools, but this button does nothing in Kodi... xev sees the stop button as "Cancel" (keycode 136).

Shouldn't the stop button trigger something like a XF86AudioStop event (just like the XF86AudioPlay event)?

Edit: I managed to get my numeric buttons to work. All I had to do is mapping them from KEY_NUMERIC_ to KEY_ (e.g. KEY_NUMERIC_1 -> KEY_1). That's what I already tried before, but I missed one important thing: Restart X (in my case, "systemctl restart kodi")
Reply
#9
Hi, I found something interesting :-)

because I also use ir-keytable and had no Numeric key, I remember a same problem with Mediaportal (that I uses somes years ago) and my remote.

You should try to remove everything in /etc/default/keyboard. The problem is that remotes are seen like English keyboards....

I have now numeric key working

imon ir-map :

0x0200001e KEY_1
0x0200001f KEY_2
0x02000020 KEY_3
0x02000021 KEY_4
0x02000022 KEY_5
0x02000023 KEY_6
0x02000024 KEY_7
0x02000025 KEY_8
0x02000026 KEY_9
0x02000027 KEY_0

0x28b595b7 KEY_1
0x2bb195b7 KEY_2
0x28b195b7 KEY_3
0x2a8595b7 KEY_4
0x299595b7 KEY_5
0x2aa595b7 KEY_6
0x2b9395b7 KEY_7
0x2a8515b7 KEY_8
0x2aa115b7 KEY_9

Keyboard.xml :
<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>

Hope it can help you ;-)
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi with ir-keytable (without lirc) not working correctly0
This forum uses Lukasz Tkacz MyBB addons.