GNOME Bugzilla – Bug 597291
Valid keycodes unrecognised
Last modified: 2010-05-18 15:35:15 UTC
A couple of valid key codes that gnome-lirc-properties doesn't recognise from my configuration, namely KEY_NEXTSONG and KEY_PREVIOUSSONG: $ cat /etc/lirc/lircd.conf.gnome # LIRC configuration file for Apple_A1156 # Generated by GNOME LIRC properties on Fri Oct 2 09:41:16 2009 # from apple/lircd.conf.macmini # # contributed by Sebastian Schaetzel # # brand: Apple # model no. of remote control: A1156 # begin remote name Apple_A1156 bits 8 eps 30 aeps 100 one 0 0 zero 0 0 pre_data_bits 24 pre_data 0x87EE81 gap 211982 toggle_bit_mask 0x0 ignore_mask 0x0000ff01 begin codes KEY_PREVIOUSSONG 0x08 KEY_NEXTSONG 0x07 KEY_MENU 0x02 KEY_PLAYPAUSE 0x04 KEY_VOLUMEDOWN 0x0D KEY_VOLUMEUP 0x0B end codes end remote (As instructed at http://live.gnome.org/gnome-lirc-properties I reported this to Fedora Bugzilla, but the maintainers told me to report it here.)
Did you seem error message about this?
Yes, gnome-lirc-properties says when I press the next/previous buttons on my remote that the codes are unrecognised. That is why I am reporting a bug, as per instructions on the gnome-lirc-properties page at http://live.gnome.org/gnome-lirc-properties: "If any key appear with "(Custom key code)" at the end, please file a bug" This is exactly what's happening to me.
Is there some problem with fixing this bug? I have already explained exactly what is wrong, and given you all the information needed to fix it (you just need to add "KEY_NEXTSONG" and "KEY_PREVIOUSSONG" to the list of recognised key codes).
A patch would be welcome.
This is just about the display of the keys in the UI, right? It is actually working?
This is correct, it is just about the display of the keys. It is actually working. Hence, it's a really simple bug to fix. The reason I think this bug is worth fixing is that showing "unknown keycode" is likely to confuse inexperienced users. Heck, it confused me for a while.
I guess these should be added to lirc.py:create_commands_table(), in the DEFAULT category. And I guess that they should be added just because lirc is using them, though I wonder if lirc should really be using KEY_NEXT instead of KEY_NEXT_SONG. But I don't know what command name it should have. For instance: ('KEY_NEXT', 'next_key', _('Next')), ('KEY_NEXT_SONG', 'what-goes-here', _('Next Song')), We should add a comment saying where these come from, because I have forgotten.
I should perhaps explain, in case it's not yet obvious, that I do not use any lirc-enabled programs. I use lirc purely to get my Mac mini's remote to generate multimedia key codes. So, for example, I have no idea about command names, because I never use them. However, I am pretty certain about the KEY_NEXTSONG (N.B., only one underscore) and KEY_PREVIOUSSONG names, because those are the codes that work in GNOME music players.
Fixed here. commit 0814a57030726796b325309b1df5afde7438b096 Author: Bastien Nocera <hadess@hadess.net> Date: Tue May 18 16:32:27 2010 +0100 Clean up "valid" keycodes list The Elisa and custom keycodes are crap, and shouldn't be used, as there's a proper list of supported keys existing in lirc (irrecord --list-namespace) and in linux/input.h header. Also add the missing KEY_PREVIOUSSONG and KEY_NEXTSONG keycodes. https://bugzilla.gnome.org/show_bug.cgi?id=597291 Note that there should be no need for you to use lirc in the future, as the appleir driver will be merged into the upstream kernel, and is already available for Fedora 12 and 13.