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

David Engel david at istwok.net
Wed Apr 25 14:56:36 UTC 2007


On Tue, Apr 24, 2007 at 07:31:41PM -0400, Michael T. Dean wrote:
> On 04/24/2007 02:23 PM, David Engel wrote:
> > 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.
> 
> So, there's really no reason to prevent a developer's chosen "default" 
> mapping for a keybinding from creating a new conflict?  That means 

No, creating a conflict in this case should be OK.  

I will reiterate something I've said in the past, though.  We should
be conservative when adding new, default key bindings.  IOW, don't do
it except in significant cases.  Instead, make sure the new
functionality is accessible through some menu action and let the user
configure their own key binding if the new functionality is important
enough to them.

FWIW, the PLAY/PLAYBACK action in this case is significant enough to
warrant a new, default binding, IMHO.

> > 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.
> 
> Agreed.  And, I'm not sure the times have changed that much.  At least 
> they haven't changed so much that I have the same problem (or the 
> motivation to create a better implementation).  :)

I just took a quick look.  Changing TranslateKeyPress() to handle and
accept another, optional context or two would be pretty easy.  The
tricky part would be transitioning existing bindings in a sane way.
I'll put it on my TODO list (even though I never seem to get to
anything on it anymore).

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list