I read a lot of texts to come this far :) After 17.04 upgrade LIRC didn't work anymore with my NUC7i5...so I did find out about using ir-keytable. (This post helped me a lot!)
So after uninstalling LIRC, my ir-keytable looked like this (interesting the lirc-protocol is still enabled):
sudo ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event6) with:
Driver ite-cir, table rc-rc6-mce
Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
Enabled protocols: lirc
Name: ITE8708 CIR transceiver
bus: 25, vendor/product: 1283:0000, version: 0x0000
Repeat delay = 500 ms, repeat period = 125 ms
Then I found out the old Mac remote I have is working on the NEC-protocol, so I created my own rc_keymaps and activated the NEC-protocol like this:
cp /lib/udev/rc_keymaps/nec_terratec_cinergy_xs /etc/rc_keymaps/nec_mac
sudo ir-keytable -p nec
Now I could run the ir-keytable-test to see the scancodes of the remote keys:
sudo ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1504134142.373150: event type EV_MSC(0x04): scancode = 0x77e15025
1504134142.373150: event type EV_SYN(0x00).
1504134143.213712: event type EV_MSC(0x04): scancode = 0x77e13025
1504134143.213712: event type EV_SYN(0x00).
1504134143.935559: event type EV_MSC(0x04): scancode = 0x77e16025
1504134143.935559: event type EV_SYN(0x00).
1504134145.042733: event type EV_MSC(0x04): scancode = 0x77e19025
1504134145.042733: event type EV_SYN(0x00).
1504134145.844078: event type EV_MSC(0x04): scancode = 0x77e1a025
1504134145.844078: event type EV_SYN(0x00).
Those scancodes have been useful to modify the copied keymap-file:
sudo nano /etc/rc_keymaps/nec_mac
The result of this modification looks like this:
cat /etc/rc_keymaps/nec_mac
# table nec_mac type: NEC
0x77e15025 KEY_VOLUMEUP
0x77e13025 KEY_VOLUMEDOWN
0x77e1a025 KEY_PLAYPAUSE
0x77e19025 KEY_PREVIOUSSONG
0x77e16025 KEY_NEXTSONG
After clearing the old keytable of ir-keytable and loading the new rc_keymaps file nec_mac, the remote worked partly in 17.04 and in Rhythmbox (I do have those commands in my rc.local to activate the keymaps on startup):
sudo ir-keytable -c
sudo ir-keytable -p nec -w /erc/rc_keymaps/nec_mac
But two buttons are not working: KEY_PREVIOUSSONG and KEY_NEXTSONG.
I do have a wireless Logitech keyboard (k830, with an USB-reciever)...here all the media-keys are working with Rythmbox.
And if I try the sudo showkey
command and I press the keyboard KEY_NEXTSONG and the IR remote KEY_NEXTSONG, I get the same keycode:
keycode 163 press
keycode 163 release
If I try installing LIRC again after all those configurations, either the IR remote is not working anymore or it's getting in some "endless loop" (eg pressing once KEY_VOLUMEUP and it goes all the way up).
So anyone has any idea how to handle the ir-keytable without LIRC to make those two keys working in rhythmbox?
My kernel-version should be up2date: 4.10.0-33-generic
Thanks for every hint.