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
Results 1 to 6 of 6
Thread: IR Map issues
-
2006-09-01, 11:54 #1Senior Member
- Join Date
- Apr 2005
- Location
- London
- Posts
- 647
IR Map issues
-
2006-09-01, 12:08 #2
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
-
2006-09-01, 14:23 #3Senior 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
-
2006-09-01, 15:00 #4Senior 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.
-
2006-09-02, 00:19 #5Senior Member
- Join Date
- Apr 2005
- Location
- London
- Posts
- 647
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
-
2006-09-02, 00:22 #6Senior 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

Reply With Quote

