After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 597291 - Valid keycodes unrecognised
Valid keycodes unrecognised
Status: RESOLVED FIXED
Product: gnome-lirc-properties
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-lirc-properties-maint
gnome-lirc-properties-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-04 12:41 UTC by Reuben Thomas
Modified: 2010-05-18 15:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Reuben Thomas 2009-10-04 12:41:39 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.)
Comment 1 Murray Cumming 2009-10-05 07:01:33 UTC
Did you seem error message about this?
Comment 2 Reuben Thomas 2009-10-05 10:49:41 UTC
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.
Comment 3 Reuben Thomas 2010-04-20 20:47:40 UTC
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).
Comment 4 Murray Cumming 2010-04-20 21:30:49 UTC
A patch would be welcome.
Comment 5 Murray Cumming 2010-04-20 21:33:52 UTC
This is just about the display of the keys in the UI, right? It is actually working?
Comment 6 Reuben Thomas 2010-04-20 21:36:58 UTC
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.
Comment 7 Murray Cumming 2010-04-21 07:03:20 UTC
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.
Comment 8 Reuben Thomas 2010-04-21 11:14:11 UTC
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.
Comment 9 Bastien Nocera 2010-05-18 15:35:15 UTC
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.