> I am always a bit slow unfortunately. However, I am very interested by > your patch and I am glad you finally did that.
This dates back to my 'B-F' conversation thread, in which F could not find any information about shortcuts. > You should also allow to do "info-inset arg". You mean allowing the insertion of this inset from command buffer? Otherwise, I do not see why this is needed. > > The .lyx definition is > > > > \begin_inset Info "shortcut:copy" > > \end_inset > > I really think that you should switch to a representation like > \begin_inset Info > type "shortcut" > arg "copy" > \end_inset I will change that. > I'd even prefer to keep the type > as an enum, even if it seems to be more work for now. Good idea. > BTW, did you investigate using InsetCommand as a base? Would it help > at all? InsetCommand insists on a latex command, but this inset does not have any. I have studied InsetCommand, InsetCollapsable, but neither of them can be used. > I am not sure that the new support for LyXRC is worth it. Where would > you need it? (besides "why not?"). When I write in lib/doc/Shortcuts.lyx "This file documents the currently used shortcuts defined in bind file BLAH, .... > This information is available in a > better version in the prefs dialog. If the goal was to make this > information available outside, then a lyxrc-get LFUN would be more > useful. The whole idea is about documentation. I have not thought beyond that. (For example, it is possible to modify shortcuts in this way.) > Actually, the idea I had about this functionality earlier was > more like an InsetLFUN that would > output the result of an LFUN. Use would be like > lfun-insert shortcut-get copy > This means that the information would also be made available to the > lyxserver. I do not insist on this particular implementation, but I > thought it was worth mentioning. I do not quite get your idea. :-) > To finish with lyxrc, you do heavy changes in lyxrc and the ugliness > of the code is even worse than it was. Unless you have a specific > application in mind, I'd propose to drop this code. I have only one use of it right now (This file documents the currently used shortcuts defined in bind file lyxrc:bind_file), but I will not be surprised that they can be used in other help files. I do not like the implementation, but I do not want to touch the 'switch-without-break' trick in LyXRC.cpp either. The author of that trick would bite me if I change it to a more readable style. :-) > Concerning shortcuts, I do not think it is wise to change a KeyMap > mathod that is used elsewhere just because it does not look right for > your use case. Actually, since the goal is to show the shortcut in the > GUI (for the documentation), I'd suggest to stick with the first > element only like the menus. KeyMap::print(true) is fine for that. I am not quite sure, because documentation is supposed to list information exhaustively. As for printbindings, the original output [][] looks bad in a button. Because it is used only in LyXFunc.cpp::LyXFunc::sendDispatchMessage, so I think it is OK to change it. > About ideas for other entries, I do not thin that bufferparams is > useful. However I'd like to see "package" and "textclass" entries, > since they are used in LaTeXConfig.lyx.in and we should aim at dropping > the generation of these files. These are among the original goals, and I will add them soon. > When code is this ugly, you are clearly abusing some interface :) I know this is ugly, but this is the only non-intrusive way. > > Do you need updateLabels? Not really. :-) > Rather > if (!name.empty()) { Yes. > > \bind "C-l" "ert-insert" # 'l' for LaTeX > > +\bind "C-S-I" "info-insert" > > > > #bind "F1" "help" # Not yet implemented! > > #bind "C-F1" "help-context" # Not yet implemented! > > If this goes in, you should investigate the other bind files. This is for testing. I am even not sure if we should add any shortcut. Afterall, this inset is supposed to be used only by developers, who can add a shortcut when writing documents. s" > > + Item "Shortcuts|s" "help-open Shortcuts" > > Item "Customization|C" "help-open Customization" > > Item "FAQ|F" "help-open FAQ" > > Item "Table of Contents|a" "help-open TOC" > > Keep this for later, unless you have a pretty complete LyX file. Have you had a look at this file? I would like to add it so that others can complete it. I think having an incomplete file in the trunk is not a big deal. Cheers, Bo