Opened 18 years ago

Closed 18 years ago

#590 closed patch (fixed)

Add ability to see active keys for a given context

Reported by: mythtv@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythcontrols Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

It can be useful to see the list of active keys for a given context. This idea was partially motivated by changeset #7689, which put a comment into tv_play.cpp with the list of allocated keys, although I ran into this problem when customizing my own keybindings.

Anyway, mythcontrols lets you see ACTION => KEY mapping. This patch lets you see KEY => ACTION mapping for a given context. It presumes that key mappings go through one context, and then default to "global" context. Any key resolved in non-global context does not fall-through. This it not necessarily representate true behavior, and definitely wrong if you consider jump point bindings.

It can be useful in any case.

To use this, go into 'Edit Keys', select a context and press the "MENU" or "INFO" key. This pops-up a dialog with the option "Used Keys". This will create a similarly-looking list that lists all the keys, one per item. The mapping is displayed like "I => INFO". If there are multiple options, the are comma-separated.

The keys are displayed in sorted order: first the digits, then the characters, then unmodified keys, then modified keys (of any sort). Within each category, the keys are sorted alphabetically (thus, Ctrl+F10 will appear before Ctrl+F9).

The display is currently purely informative: you cannot edit anything in this display (yet).

Attachments (4)

mythcontrols-usedkeys.patch (6.0 KB) - added by mythtv@… 18 years ago.
patch (also fixes some "unused parameter" warnings)
mythcontrols-usedkeys.tar (20.0 KB) - added by mythtv@… 18 years ago.
tar of new files
mythcontrols-usedkeys2.patch (41.0 KB) - added by mythtv@… 18 years ago.
major rework -- 2 new views (v. 1), 1,2,3 change views, display source context, model context interdepedence (FindContexts?)
mythcontrols-usedkeys3.patch (39.8 KB) - added by mythtv@… 18 years ago.
fixed per comments in Ticket

Download all attachments as: .zip

Change History (8)

Changed 18 years ago by mythtv@…

Attachment: mythcontrols-usedkeys.patch added

patch (also fixes some "unused parameter" warnings)

Changed 18 years ago by mythtv@…

Attachment: mythcontrols-usedkeys.tar added

tar of new files

comment:1 Changed 18 years ago by danielk

Milestone: 0.20
Owner: changed from Isaac Richards to danielk

comment:2 Changed 18 years ago by danielk

Can you make the UI a little simpler, requiring the user to call up the menu doesn't exactly advertise this feature. You could have one of the listed commands be "[Show key mappings]".

Also, you really need to have things like "TV Editing" show the "TV Playback" mappings as well. Even if you don't get all of these right, if it is easy to fix, it will get fixed...

And, you need to show where the mapping is made (i.e. is this key mapped in "TV Editing", "TV Playback", "Global", or "Qt"?)

It would also be nice if you showed conflicts in a red and/or a bold font, just to make them stick out.

Changed 18 years ago by mythtv@…

major rework -- 2 new views (v. 1), 1,2,3 change views, display source context, model context interdepedence (FindContexts?)

comment:3 Changed 18 years ago by mythtv@…

mythcontrols-usedkeys2.patch puts everything in mythcontrols.cpp instead of a separate dialog.

It also contains some code that looks odd off my computer, dealing with keybindings that start with "remote" that are for related work dealing with LIRC commands (having them bind directly to actions, instead of being bound to a key which is then bound to an action). It doesn't hurt anything (N.B. check case of a , but it looks odd out-of-context.

Also, I noticed my patch contains spurious changes in keygrabber.*. Fixed shortly.

Changed 18 years ago by mythtv@…

fixed per comments in Ticket

comment:4 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [8287]) Closes #590 by applying patch.

This adds the ability to see the keys mapped for any specific contexts. This new feature is accessible via the menu (hit the info or menu key 'i'/'m') This is a purely informative display; it helps you avoid hiding a key usable in that context but possibly defined in a parent context.

If you see a context problem check out FindContexts?() in mythcontrols.cpp.

Note: See TracTickets for help on using tickets.