Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6

Thread: IR Map issues

  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    London
    Posts
    647

    IR Map issues

    SlimDevices support closed my bug http://bugs.slimdevices.com/show_bug.cgi?id=3996 pending discussion on the forum (although this won't be the first time I've brought this up) so...

    It seems to me that it's not possible to remap some remote keys with different actions for single presses and hold.
    In my custom.map file I have the following:

    [common]
    arrow_right = dead
    arrow_right.single = right
    arrow_right.hold = modefunction_PLUGIN.LastFM::Plugin->lastfm_skip

    The intention is that single press of the right button would behave as normal but holding the right button would executes a different action.
    However, with this enabled, when I press right once from an INPUT.List mode, two move rights are executed, as this d_ir,d_command log shows:

    2006-08-24 22:14:19.3609 IR: 7689d02f -> code: arrow_right
    2006-08-24 22:14:19.3629 found function exit_right for button arrow_right in mode INPUT.List from map Default
    2006-08-24 22:14:19.6189 found button arrow_right for 7689d02f
    2006-08-24 22:14:19.6196 found function right for button arrow_right.single in mode common from map tsu2000.map

    How can I set up the custom MAP file to do what I want?

    James

  2. #2
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

    IR Map issues

    Quoting James <James.2dgyxn1157136901 (AT) no-mx (DOT) forums.slimdevices.com>:

    >
    > SlimDevices support closed my bug
    > http://bugs.slimdevices.com/show_bug.cgi?id=3996 pending discussion on
    > the forum (although this won't be the first time I've brought this up)
    > so...
    >
    > It seems to me that it's not possible to remap some remote keys with
    > different actions for single presses and hold.
    > In my custom.map file I have the following:
    >
    > [common]
    > arrow_right = dead
    > arrow_right.single = right
    > arrow_right.hold = modefunction_PLUGIN.LastFM::Plugin->lastfm_skip


    this only affects 'common' mode. Since your log shows that you are in
    INPUT.List, you'll need to edit the mapping in the [INPUT.List] section
    -kdf

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    London
    Posts
    647
    I think not - if you look at my log and the code that generated it, lookupFunction() in IR.pm, you see that mapped commands were picked up from INPUT.List in default map AND common from custom map.
    (common mode commands are checked in all modes, if a mode specific match is not found.)

    I guess the real problem is in the order of mapping checks done in that function - shouldn't all the combinations be checked in the custom map, then fall back to the default map if nothing found?

    The way it's set up now means I'd have to define my custom key overrides in *every* mode, but isn't that the point of the [common] section?

    James

  4. #4
    Senior Member
    Join Date
    Jun 2005
    Posts
    381

    Re: IR Map issues

    James wrote:
    > I think not - if you look at my log and the code that generated it,
    > lookupFunction() in IR.pm, you see that mapped commands were picked up
    > from INPUT.List in default map AND common from custom map.
    > (common mode commands are checked in all modes, if a mode specific
    > match is not found.)


    It looks to me like the main problem is that INPUT.List uses a mapping
    of arrow_right (no single), which triggers exit_right, which executes a
    callback in the parent mode. That callback might be resetting the hold
    timer, or outright calling an arrow_right.single. What is the parent
    mode here?

    > I guess the real problem is in the order of mapping checks done in that
    > function - shouldn't all the combinations be checked in the custom map,
    > then fall back to the default map if nothing found?


    The way things are processed go like this:
    1) Custom mode specific
    2) Default mode specific
    3) Custom mode group
    4) Default mode group
    5) Custom common
    6) Default common

    > The way it's set up now means I'd have to define my custom key
    > overrides in *every* mode, but isn't that the point of the [common]
    > section?


    If it processed all the custom stuff first, then you'd have to copy over
    the mode specific stuff from the default map. At least the way it is,
    you won't have duplicate entries in custom and default.

    My recommendation is to add the arrow_right = dead and
    arrow_right.single = right to the INPUT.List section of your custom map.
    Maybe also add that to INPUT.Choice.

  5. #5
    Senior Member
    Join Date
    Apr 2005
    Location
    London
    Posts
    647
    Quote Originally Posted by Robert Moser View Post
    If it processed all the custom stuff first, then you'd have to copy over
    the mode specific stuff from the default map. At least the way it is,
    you won't have duplicate entries in custom and default.

    My recommendation is to add the arrow_right = dead and
    arrow_right.single = right to the INPUT.List section of your custom map.
    Maybe also add that to INPUT.Choice.
    Thanks, I'll give that a try.

    Generally speaking, is it the intention that one starts with an empty custom map and only adds the changes required?
    The custom map I started with comes with the Pronto remote commands and has a lot of stuff in it that I'm not sure is necessary.

    James

  6. #6
    Senior Member
    Join Date
    Apr 2005
    Location
    London
    Posts
    647
    Oops meant to say, those commands were from the main player menu.
    When I press right once, the first command processed takes me into a sub-menu, then the 2nd command takes me an extra level deeper!

    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •