[mythtv] Why allow conflicting bindings (was Re: "New" default keybindings)

David Engel david at istwok.net
Tue Apr 24 18:23:59 UTC 2007


On Tue, Apr 24, 2007 at 11:25:09AM -0400, Michael T. Dean wrote:
> Perhaps relevant to the discussion:
> [5896] ( http://svn.mythtv.org/trac/changeset/5896 ) changed the code to 
> print a warning but allow multiple actions to be bound to the same key 
> in a context, such that the first action handled by the code wins and 
> others are ignored.  Why was that approach chosen by David Engel?  Was 
> it specifically for user-specified mappings (when the user chooses to 
> create a conflicting binding), or was it meant to help handle new 
> bindings that create conflicts for the user (meaning changing 
> RegisterKey() is probably not desirable)?

It was to allow user-specified mappings to work around the problem
that the TV Frontend context is way too broad.  I have the Play button
on my remote mapped to the 'Y' key which is in turn mapped to the
PLAYBACK action in "TV Frontend".  Since the PLAYBACK action only has
meaning in the Watch Recordings and Program Priority screens, my
remote's Play button was useless in any other "TV Frontend" context.

Allowing conflicts lets me bind other actions to the 'Y' key for use
in other "TV Frontend" contexts.  For exemple, it lets me keep the
default binding of 'Y' to the VIEWCARD action which is used in the
View Scheduled screen.

Admittedly, allowing conflicts was a quick and dirty solution.  A
better fix might be to add another context level for TV.  For example,
look for bindings in "TV Specific Screen" first, then in "TV Frontend"
and finally in "Global".  Another, possbily even better, fix would be
to add a more generalized way of stacking contexts programatically.
Both of those changes seemed like overkill at the time when I was the
only one who had a problem.

FWIW, I have similar issues with the "TV Playback" context also being
a bit too broad.  I have a small number of remote keys that I want to
work differently between recorded and live TV.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list