Modify

Ticket #9613 (closed Patch - Feature: Won't Fix)

Opened 2 years ago

Last modified 15 months ago

Multi-key bindings

Reported by: Jim Stichnoth <stichnot@…> Owned by: stichnot
Priority: minor Milestone: unknown
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This patch adds support for emacs-style multi-key bindings, which is useful for smaller remote controls without enough buttons to map all your favorite actions. This is especially useful for the TV Playback context which has more than 100 available keybindings.

Before using this patch, you must manually execute the following mysql command. Unpatched code will still work correctly even after executing the command. If you try the patch without executing the mysql command, there's a good chance that *all* your keybindings will be reset to their defaults.

ALTER TABLE keybindings ADD COLUMN multikey varchar(128) default NULL;

The implementation currently has a few limitations. (Translation: I'd rather not do all the work before the patch is in principle accepted...)

  1. Multi-key bindings are only handled in the TV Playback context, as well as the associated Global bindings. It would be very simple to support other contexts, except that I don't know how to provide reasonable feedback without an OSD object available.
  1. Multi-key bindings are not (yet) implemented for JumpPoints?.
  1. The only way to edit the multi-key bindings is through MythWeb with the attached patch.
  1. Multi-key bindings are limited to 4 keys, due to the use of QKeySequence.
  1. There is practically no checking for conflicts between regular keybindings and multi-key bindings.
  1. It might be better if there were a timer to reset multi-key input after so long, like the QueuedInput? related code currently there.

Attachments

multikeybindings_v1.patch (17.2 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
mythweb_multikey_v1.patch (2.3 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
multikeybindings_v2.patch (18.4 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
multikeybindings_v3.patch (27.5 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
mythweb_multikey_v2.patch (4.2 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
multikeybindings_v6.patch (27.5 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
Updated version.
multikeybindings_v7.patch (27.4 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
Change VERBOSE() to LOG().
multikeybindings_v8.patch (27.6 KB) - added by Jim Stichnoth <stichnot@…> 2 years ago.
Add Multikeydata::clear() and call it in MythMainWindow::ClearKeyContext?().
multikeybindings_v9.patch (27.6 KB) - added by Jim Stichnoth <stichnot@…> 22 months ago.

Change History

Changed 2 years ago by Jim Stichnoth <stichnot@…>

Changed 2 years ago by Jim Stichnoth <stichnot@…>

Changed 2 years ago by Jim Stichnoth <stichnot@…>

comment:1 Changed 2 years ago by Jim Stichnoth <stichnot@…>

Added v2 patch, which fixes a major bug (should test more thoroughly after making a "minor' change...), plus a couple of minor problems.

comment:2 Changed 2 years ago by mdean

  • Owner set to mdean
  • Status changed from new to accepted

Changed 2 years ago by Jim Stichnoth <stichnot@…>

Changed 2 years ago by Jim Stichnoth <stichnot@…>

comment:3 Changed 2 years ago by Jim Stichnoth <stichnot@…>

Updated with new mythtv and mythweb patches that add similar multi-key binding support for jump points.

The jumppoints table needs to be modified before using this patch. As before, unpatched code will still work with the updated database. The complete mysql is:

ALTER TABLE keybindings ADD COLUMN multikey varchar(128) default NULL;
ALTER TABLE jumppoints ADD COLUMN multikey varchar(128) default NULL;

To simplify the code, the original single-key bindings are now treated as non-special cases of multi-key bindings.

To maintain a good user experience, if the current queued input sequence ends with a single-key jump point action, the jump point takes precedence and is immediately handled.

Because of the nontrivial interplay between jump points and regular bindings (specifically, the possibility that a jump point with a local action with the same key binding will be treated as the local action rather than the jump point action), MythMainWindow::TranslateKeyPress?() had to be largely refactored/rewritten.

Changed 2 years ago by Jim Stichnoth <stichnot@…>

Updated version.

Changed 2 years ago by Jim Stichnoth <stichnot@…>

Change VERBOSE() to LOG().

Changed 2 years ago by Jim Stichnoth <stichnot@…>

Add Multikeydata::clear() and call it in MythMainWindow::ClearKeyContext?().

Changed 22 months ago by Jim Stichnoth <stichnot@…>

comment:4 Changed 15 months ago by stichnot

  • Owner changed from mdean to stichnot
  • Status changed from accepted to assigned

comment:5 Changed 15 months ago by stichnot

  • Status changed from assigned to closed
  • Resolution set to Won't Fix

Closing as Won't Fix. I've been using this patch for over a year and I have to conclude that it isn't the right user experience for increasing the effective number of buttons on a remote. The main problem is that it is not very practical to have to memorize a collection of multi-button sequences. Compounding the problem is the fact that it is important to give feedback on partial multikey sequences, but hard to do so in a meaningful way. For example, I have a sequence that begins with the Thumbs-Up button on my remote, which is mapped via LIRC to Shift+F8, which is a prefix for actions EDIT, ADJUSTSTRETCH, DEBUGOSD, and TOGGLEFILL. None of these names is particularly suitable for given user feedback on partially input sequences.

I still think it's important to have some way of expanding the effective number of buttons on a remote control, so I'll be looking into better ways of achieving this.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.