Opened 13 years ago

Closed 12 years ago

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

Multi-key bindings

Reported by: Jim Stichnoth <stichnot@…> Owned by: Jim Stichnoth
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 (9)

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

Download all attachments as: .zip

Change History (14)

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

Attachment: multikeybindings_v1.patch added

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

Attachment: mythweb_multikey_v1.patch added

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

Attachment: multikeybindings_v2.patch added

comment:1 Changed 13 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 13 years ago by sphery

Owner: set to sphery
Status: newaccepted

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

Attachment: multikeybindings_v3.patch added

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

Attachment: mythweb_multikey_v2.patch added

comment:3 Changed 13 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 13 years ago by Jim Stichnoth <stichnot@…>

Attachment: multikeybindings_v6.patch added

Updated version.

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

Attachment: multikeybindings_v7.patch added

Change VERBOSE() to LOG().

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

Attachment: multikeybindings_v8.patch added

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

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

Attachment: multikeybindings_v9.patch added

comment:4 Changed 12 years ago by Jim Stichnoth

Owner: changed from sphery to Jim Stichnoth
Status: acceptedassigned

comment:5 Changed 12 years ago by Jim Stichnoth

Resolution: Won't Fix
Status: assignedclosed

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.

Note: See TracTickets for help on using tickets.