How to get a seamless remote experience

  Thread Rating:
  • 7 Vote(s) - 4.29 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Baxh Offline
Junior Member
Posts: 4
Joined: Feb 2015
Reputation: 0
Post: #151
I followed the instructions to use the in kernel lirc.

ir-keytable -t works as expected and translates my keypresses to keyboard commands:

Code:
# ir-keytable -t                                                                                                                              :(
Testing events. Please, press CTRL-C to abort.
1424458324.268195: event type EV_MSC(0x04): scancode = 0x82
1424458324.268195: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x0001)
1424458324.268195: event type EV_SYN(0x00).
1424458324.268207: event type EV_MSC(0x04): scancode = 0x82
1424458324.268207: event type EV_SYN(0x00).
1424458324.520165: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x0001)
1424458324.520165: event type EV_SYN(0x00).
1424458325.076174: event type EV_MSC(0x04): scancode = 0x90
1424458325.076174: event type EV_KEY(0x01) key_down: KEY_LEFT(0x0001)
1424458325.076174: event type EV_SYN(0x00).
1424458325.076198: event type EV_MSC(0x04): scancode = 0x90
1424458325.076198: event type EV_SYN(0x00).
1424458325.328159: event type EV_KEY(0x01) key_up: KEY_LEFT(0x0001)
1424458325.328159: event type EV_SYN(0x00).

But Kodi does not react to them! Am I missing a step here? If I stop Kodi I can use my IR-remote to enter numbers in the console, so it works as it should, but why does kodi not find it?

Some more info:
Code:
# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event2) with:
    Driver saa716x, table rc-tbs-nec
    Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC other
    Enabled protocols: NEC RC-5 RC-6 JVC SONY LIRC other
    Name: saa716x IR (TurboSight TBS 6618)
    bus: 1, vendor/product: 6618:0001, version: 0x0001
    Repeat delay = 500 ms, repeat period = 125 ms

Code:
# ls -la /dev/input/
insgesamt 9584
drwxr-xr-x 2 root root     120 Feb 20 19:27 by-id
drwxr-xr-x 2 root root     140 Feb 20 19:27 by-path
-rw------- 1 root root 9814016 Feb 20 19:47 core
crw-r----- 1 root root  13, 64 Feb 20 19:27 event0
crw-r----- 1 root root  13, 65 Feb 20 19:27 event1
crw-r----- 1 root root  13, 74 Feb 20 19:27 event10
crw-r----- 1 root root  13, 75 Feb 20 19:27 event11
crw-r----- 1 root root  13, 76 Feb 20 19:27 event12
crw-r----- 1 root root  13, 77 Feb 20 19:27 event13
crw-r----- 1 root root  13, 78 Feb 20 19:27 event14
crw-r----- 1 root root  13, 79 Feb 20 19:27 event15
crw-r----- 1 root root  13, 80 Feb 20 19:27 event16
crw-r----- 1 root root  13, 81 Feb 20 19:27 event17
crw-r----- 1 root root  13, 82 Feb 20 19:27 event18
crw-r----- 1 root root  13, 83 Feb 20 19:27 event19
crw-r----- 1 root root  13, 66 Feb 20 19:27 event2
crw-r----- 1 root root  13, 84 Feb 20 19:27 event20
crw-r----- 1 root root  13, 85 Feb 20 19:27 event21
crw-r----- 1 root root  13, 67 Feb 20 19:27 event3
crw-r----- 1 root root  13, 68 Feb 20 19:27 event4
crw-r----- 1 root root  13, 69 Feb 20 19:27 event5
crw-r----- 1 root root  13, 70 Feb 20 19:27 event6
crw-r----- 1 root root  13, 71 Feb 20 19:27 event7
crw-r----- 1 root root  13, 72 Feb 20 19:27 event8
crw-r----- 1 root root  13, 73 Feb 20 19:27 event9
crw-r--r-- 1 root root  13,  0 Feb 20 19:27 js0
crw-r--r-- 1 root root  13,  1 Feb 20 19:27 js1
crw-r--r-- 1 root root  13,  2 Feb 20 19:27 js2
crw-r--r-- 1 root root  13,  3 Feb 20 19:27 js3
crw-r----- 1 root root  13, 63 Feb 20 19:27 mice
crw-r----- 1 root root  13, 32 Feb 20 19:27 mouse0
crw-r----- 1 root root  13, 33 Feb 20 19:27 mouse1
lrwxrwxrwx 1 root root       6 Feb 20 19:27 tbs-ir -> event2


# ls -la /dev/input/by-path
insgesamt 0
lrwxrwxrwx 1 root root 10 Feb 20 19:27 pci-0000:00:14.0-usb-0:2:1.2-event-kbd -> ../event21
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:00:14.0-usb-0:3:1.0-event-mouse -> ../event4
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:00:14.0-usb-0:3:1.0-mouse -> ../mouse1
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:00:14.0-usb-0:3:1.1-event -> ../event5
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:01:00.0-event-ir -> ../event2

# ls -la /dev/input/by-id
insgesamt 0
lrwxrwxrwx 1 root root  9 Feb 20 19:27 usb-Logitech_USB_Receiver-event-if01 -> ../event5
lrwxrwxrwx 1 root root  9 Feb 20 19:27 usb-Logitech_USB_Receiver-event-mouse -> ../event4
lrwxrwxrwx 1 root root 10 Feb 20 19:27 usb-Logitech_USB_Receiver-if02-event-kbd -> ../event21
lrwxrwxrwx 1 root root  9 Feb 20 19:27 usb-Logitech_USB_Receiver-mouse -> ../mouse1
find quote
immerc Offline
Junior Member
Posts: 3
Joined: Feb 2015
Reputation: 0
Post: #152
Baxh, if you turn on debugging in Kodi do you see anything in the logs?

Have you verified that the keymap in Kodi is set up right as in post #4?

http://forum.kodi.tv/showthread.php?tid=...#pid828177
find quote
immerc Offline
Junior Member
Posts: 3
Joined: Feb 2015
Reputation: 0
Post: #153
When I made a most recent upgrade the arrow keys on my remote stopped working properly. They were suddenly generating multiple keypresses. The rest of the remote keys continued to work fine.

What it seems like is that there's another kernel module that is (mis)handling some of the inputs from the remote.

When I use "ir-keytable -t" and "xev" at the same time, I can see that the direction buttons on the remote are generating events in "xev", but "ir-keytable" doesn't see them.

With the rest of the keys I see both single events in "xev" and the corresponding events in "ir-keytable -t".

Does anybody know what kernel module might be interfering?
find quote
adelaney Offline
Junior Member
Posts: 1
Joined: Mar 2015
Reputation: 0
Post: #154
(2015-01-29 02:27)fbacher Wrote:  I have Ubuntu 14.10 and using the kernel IR support, not lirc. I have an mce remote working for a number of navigation keys (left, right, up, down, play, etc.) but I can not get it to work for simple things like KEY_BACKSPACE or KEY_C, which I remapped a few keys to in order to avoid the > 255 problem.

Using ir-keytable -t, I can see that it properly generates KEY_C, or KEY_BACKSPACE, yet kodi does not recognize them.

This is very similar to my problem. Everything was working fine before 14.10, I'm just using a little Apple Remote, and after the upgrade my KEY_PLAYPAUSE and KEY_BACKSPACE no longer worked on the remote. I switched KEY_PLAYPAUSE to KEY_PLAY and it started working again...and KEY_BACKSPACE is, as you say, generated in ir-keytable -t but Kodi doesn't respond to it.

In a somewhat related issue, my whole ir-keytable -w command no longer seems to work (post 14.10 upgrade) from rc.local, although it does still work in Terminal.

Does anyone even know where kodi remaps ir-keytable key presses to kodi commands? For example in my keyboard keymap file I'm able to redefine <up> to VolumeUp during <FullscreenVideo>. So that my apple remote button (defined as KEY_UP) can change the volume while videos are playing. But I haven't the faintest idea how kodi knows to define KEY_UP to <up> in the first place. I know I didn't set that. I'd love to know because I have a feeling I wouldn't have to guess and check anymore how I should define my key presses in my ir-keytable configuration file. I've had to make edits to it in the past when things stopped working as well (for example at one point KEY_MENU no longer worked and I had to redefine it as KEY_BACKSPACE...now of course neither of them work. And then another time KEY_SPACE no longer worked, so I switched it to KEY_PLAYPAUSE. But this is all just guess and check because I don't know how or where kodi is interpreting my ir-keytable definitions).
find quote
Baxh Offline
Junior Member
Posts: 4
Joined: Feb 2015
Reputation: 0
Post: #155
(2015-02-28 22:47)immerc Wrote:  Baxh, if you turn on debugging in Kodi do you see anything in the logs?

Have you verified that the keymap in Kodi is set up right as in post #4?

http://forum.kodi.tv/showthread.php?tid=...#pid828177


@imerc I did turn on debugging in Kodi but nothing showed up, the keymap is also setup (I used dedicated lirc before and it worked). I am using a wireless XBOX 360 Controller now (which also didn't work initially, but I created a workaround
find quote
dadadavid Offline
Junior Member
Posts: 1
Joined: Mar 2015
Reputation: 0
Post: #156
Hi,
I am still relatively new to Kodi, but I ran into the same problems as mentioned above: purged lirc (ubuntu/apt-get) and used a custom keymapping with some keys from the IR remote working as soon as I reload the keymap (like KEY_PLAYPAUSE, KEY_FASTFORWARD) and some not (like KEY_0-KEY_9, KEY_F, KEY_POWER and KEY_BACKSPACE) - even though they are working just fine outside of Kodi (in a terminal for example).
I also found some kind of clue as to where the problem is: If I killall -9 kodi the keys still won't work, but If I leave Kodi normally and (using the default Ubuntu login screen) log in again, everything works just fine (every key behaves just like it came from an ordinary keyboard).
I am not using any custom kodi keymap.xml except one:
Code:
<f>ActivateWindow(Favourites)</f>
in the global/keyboard section.

I am using Ubuntu 14.10 and enabled autologin with a pure Kodi session (no gnome).

Since I've already used the better part of the evening trying to set this damn IR remote up, I am not really motivated into doing more "research" into that, at least for today and probably the rest of the week, but maybe someone here could.
find quote
Post Reply