Fix for Play/Pause key on some MCE remotes

Bug #1623512 reported by Reuben Thomas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kodi (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

The file /usr/share/lirc/remotes/mceusb/lircd.conf.mceusb contains a section reading:

#seen on HP Pavilion dv3t remote --Tim Mann, 3 Nov 2009
        Media 0x00007b7f
        PlayPause 0x00007b91

I have a Compro VideoMate K300 remote, and I can't find a key corresponding to Media, but it does have a Play/Pause key generating the same code as above (0x7b91).

However, using it with Kodi, for example, it does nothing useful, because Kodi does not recognise the "PlayPause" code.

I suggest that for Kodi, XMBC & similar programs it's probably more useful to change the code output to KEY_PLAY. (I tried KEY_PLAYPAUSE, which is also mentioned in Kodi's Lircmap.xml, but that did not work in Kodi: nothing happened when I pressed the key.) With KEY_PLAY, the key works as expected: it plays or pauses the music.

The change is to change "PlayPause" in the above line to "KEY_PLAY".

Arguably, the correct fix is to change the keycode to "KEY_PLAYPAUSE", and then make Kodi correctly respond to "KEY_PLAYPAUSE". I attempted to do this by editing Kodi's Lircmap.xml, but failed.

I looked at upstream lirc, but that has completely changed the organisation of remote config files since 0.9.0, so it seems most appropriate to make a fix in Ubuntu (and possibly Debian).

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lirc 0.9.0-0ubuntu6
ProcVersionSignature: Ubuntu 4.4.0-34.53-generic 4.4.15
Uname: Linux 4.4.0-34-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed Sep 14 14:00:37 2016
InstallationDate: Installed on 2014-11-26 (658 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
SourcePackage: lirc
UpgradeStatus: Upgraded to xenial on 2016-07-25 (50 days ago)
mtime.conffile..etc.lirc.hardware.conf: 2016-09-14T12:27:53.394843
mtime.conffile..etc.lirc.lircd.conf: 2016-09-14T13:55:14.416867

Revision history for this message
Reuben Thomas (rrt) wrote :
Revision history for this message
Alec Leamas (leamas-alec) wrote :

Such a fix is just not possible in latest lirc 0.9.4 since it does not contain any remotes definitions. Although it's possible to patch current version, from zesty+ the remote definitions lives in http://sf.net/p/lirc-remotes; this is also whar other distros use. So, the best solution here would be to close this ticket and open a new at the upstream remotes project.

Revision history for this message
Reuben Thomas (rrt) wrote :

I'm suggesting a fix for e.g. Xenial, as otherwise many users will have non working play/pause, a basic function, for a few years. The simple fix I suggest is safe, as it only affects MCE remotes, where the problem is.

Revision history for this message
Alec Leamas (leamas-alec) wrote :

I'm just the upstream maintainer, so I'm not involved in if/how current stable releases are patched. That said, since new users will use the new database I'd suggest you file a bug there for the benefit of those; this is not to say anything about whether xenial should be patched or not

Revision history for this message
Reuben Thomas (rrt) wrote :

Thanks for the suggestion (and for your work upstream!).

I had a look at lirc-remotes, and it already has what I consider the correct fix, namely, to change the key code to KEY_PLAYPAUSE.

If when I get this version of lirc on my machine I still have my MCE remote, and it still doesn't work in Kodi, I suspect it will be time to chase the bug there instead.

Revision history for this message
Alec Leamas (leamas-alec) wrote :

You can test using the ppa at https://launchpad.net/~leamas-alec/+archive/ubuntu/lirc-0.9.4. Don't forget the message if you upgrade, the update requires configuration changes.

Revision history for this message
Reuben Thomas (rrt) wrote :

Thanks! I probably won't have time to do that, but I'll try to remember if I do.

Changed in lirc (Ubuntu):
status: New → Confirmed
Revision history for this message
Alec Leamas (leamas-alec) wrote :

Setting this to confirmed since the remote definition differs from the sort-of-upstream lirc-remotes.

Basically this is a Kodi bug since Kodi (as the only major client) does not respect the mappings done by lircrc but instead reads the raw codes from lircd. One of the purposes of lircrc is to handle problems like this, and so it does - when used.

Since re-mapping this key according to the patch would break configurations for other users which have handled this using .lircrc I'd recommend closing this bug as wontfix.

Someone should file a bug against Kodi for bad behaviour. It's too late to skip the raw reads from lircd, but adding an option to use lircrc is IMHO the right path. Kodi does some mapping, but lircrc is more than mappings: modes, repeat suppression, long keypresses and so on.

Changed in lirc (Ubuntu):
importance: Undecided → Medium
affects: lirc (Ubuntu) → kodi (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.