I am using a RC6 MCE remote. Every button I press on the remote is executed twice in OSMC. For example when I press “one down” OSMC executes two down. One way to repair this is to login and disable the following module:
It doesn’t make a difference whether the link /etc/lirc/lircd.conf points to lircd-full.conf or rc6-mce-lircd.conf.
What is the permanent and “correct” way to get rid of the double key event?
Using Linux osmc 3.18.13-1-osmc #1 SMP PREEMPT Sun May 17 18:50:26 UTC 2015 armv7l GNU/Linux
What sort of RC6 remote do you have ? Can you provide a photo of it and the model number ? What type of IR receiver are you using ?
The rc6-mce-lircd profile is now deprecated - basically it was found to cause double presses on some remotes because there are multiple rc6 profiles in the same file with overlapping button codes, and lircd doesn’t handle this properly.
The same issue affects the xbox 360 universal media remote which has a profile in rc6-mce-lircd. Because of this I created a separate xbox 360 profile (which you’ll get if you run updates) which works properly for that remote - no duplicate button presses, plus I’ve fixed up some of the button mapping.
However I don’t have access to any of the other remotes that are supported by the rc6 profile to test with so I haven’t split out any of the others out of that file yet.
If you can, can you try testing each individual profile in rc6-mce-lircd to find which one is the correct one for your remote and whether the button mappings are correct ?
To do this copy the file from /etc/lirc to your osmc home directory then use a text editor to delete all but one of the profiles from the conf file, save those changes then select it through the browse option in remotes. You should find that when you have the correct one on its own you won’t get duplicate button presses.
If you can identify which one is the correct section, confirm the button mappings are correct (and if not tweak them so they are) and provide a photo and model number of the remote and any changes you made to the button mappings I’ll add a new specific entry for that remote to our remote database.
I have a remote marked RC6 that came with a Hauppauge PVR150 or with the XP MediaCenter I bought way back.
I have copied the mceusb_hauppauge profile to a separate custom-lircd.conf file in ~ and found that all keys work. irw produces the following output:
Ok well we may as well use the pvr350 profile as a starting point then.
Regarding the power button - there is no way to do what you ask (bringing up the power menu directly, but not powering down) by only editing a lircd.conf file - because there are no mappings in Lircmap.xml in the linux-input-layer section to bring up this menu. (That I know of anyway)
To do this you would need to customise either Lircmap.xml or more probably remotes.xml to change the power button action to bring up that menu instead.
I see in that lircd.conf that the power button is mapped to KEY_POWER2 - this will not do anything (no matching entry in Lircmap.xml) so it should be changed to KEY_POWER. This will trigger an immediate shutdown when you press the button, to change it to bring up a menu instead you will need a custom remote.xml as well.
To change the mappings of the EPG and MORE buttons, you want to monitor the key events using either irw or tail the kodi log in debug mode. Press the button that currently does the function you want and note what KEY_ code it sends. Press the button that you want to do this function instead and see what KEY_ code it sends, then edit the codes in the lircd.conf file.
For the change to take effect re-select the remote in remotes or:
I understand that the lircd.conf maps the scancodes to keys. I agree that I will need to change the key-action-mappings to change behaviour of the POWER and EPG button. So my next step is to identify the necessary files. I am, though, too dumb to find either remotes.xml or lircmap.xml. Googling kodi wiki/forums for information I found hints to look in ~/.kodi/userdata - but no luck:
The default Lircmap.xml is at /usr/share/kodi/system/Lircmap.xml and the default remote.xml is at /usr/share/kodi/system/keymaps/remote.xml.
You would put custom versions of these at /home/osmc/.kodi/userdata/ and /home/osmc/.kodi/userdata/keymaps/ respectively.
With remote.xml you only need to add the entries you’re customising, you don’t need to copy the entire file - although you can certainly do that and then trim out the stuff you’re not changing.
I’m not sure whether Lircmap.xml works the same way or whether you need to copy (then customise) the entire file, as I haven’t tried this myself. I would tend to leave Lircmap.xml alone if you can make the necessary customisations purely with remote.xml.
Yep. But that’s the default Lircmap.xml that ships with all versions of Kodi.
Just ignore that one. As I said earlier - we remap all remote names to “linux-input-layer” in eventlircd - which you will see when you run irw. So only the linux-input-layer section of Lircmap.xml is relevant.
Linux uinput button names are defined in the Linux kernel, so you have to use one that is valid or it gets filtered out by the kernel.
Since only those that are defined in linux-input-layer in Lircmap.xml are being used, those are the only ones you need worry about.
Have a look at the xbox360 profile I made for an example of a profile that has most of the buttons mapped.
Using irw I mapped the most important keys of my RC6. Some keys - like KEY_EPG - require remapping.
KEY_TV My TV
KEY_AUDIO My Music
KEY_CAMERA My Pictures
KEY_VIDEO My Videos
KEY_PREVIOUS Replay KEY_CHANNELDOWN
KEY_NEXT Skip KEY_CHANNELUP
KEY_EXIT Back ok
KEY_INFO More ContextMenu
KEY_PVR Recorded TV
KEY_EPG Guide ActivateWindow(TVGuide)
KEY_DVD DVD Menu
I’ve made some changes and stored the custom files in /home/osmc/.kodi/userdata but the remote behaviour doesn’t change. I’ve rebooted the Raspberry after making the changes.
Instead of modifying custom xmls in ~/.kodi/userdata I have tried /user/share/kodi/system with success. EPG and Info button work as desired - except for some edge cases when watching LiveTV. I will fiddle with the remote.xml until everything works and then post the files here.
If you only edit the custom mappings in this location without creating the custom maps in the userdata directory, your custom mappings will be overwritten and lost next time Kodi is updated. Custom mappings in userdata will persist even through an update.
The issue of the RC6 kernel decoder loading automatically is on our to-do list to fix, we just haven’t had a chance to look at it yet. In the meantime you can do what you have above (although putting it in /etc/rc.local is probably sufficient rather than creating a service)
Also it’s possible to disable the decoder using ir-keytable (this is discussed in another thread) but unloading the module will work too.