From the user list: It's impossible to add a shortcut such as "self-insert i.e." using the shortcut dialog. This is because "self-insert" is categorized as "Hidden" in LyXAction.cpp so that all the bindings in latinkeys.bind don't show up in the dialog. That said, however, it's perfectly reasonable to want to add such shortcuts, so we ought to figure out some way to allow it.

The attached patch seems to work.

That said, I think we should also introduce a distinction between "Hidden" LFUNs and "Private" LFUNs, where the latter are the ones that say "This is internal LFUN, not to be used by users" in LyXAction.cpp. THOSE users really ought not to allowed to bind.

Richard

Index: frontends/qt4/GuiPrefs.cpp
===================================================================
--- frontends/qt4/GuiPrefs.cpp  (revision 27693)
+++ frontends/qt4/GuiPrefs.cpp  (working copy)
@@ -2181,8 +2181,12 @@
        }
        if (!newItem) {
                switch(lyxaction.getActionType(action)) {
-               case LyXAction::Hidden:
-                       return 0;
+               case LyXAction::Hidden: {
+                       if (tag == KeyMap::System)
+                               return 0;
+                       newItem = new QTreeWidgetItem(systemItem_);
+                       break;
+               }
                case LyXAction::Edit:
                        newItem = new QTreeWidgetItem(editItem_);
                        break;

Reply via email to