> This is definitely _not_ the way to go. If you need some code to get a > vector of functions and keysequences, just add that to KeyMap.h. The > GUI code shall not have to know about the structure of key sequences.
You are right. > Similarly, the printing of keysyms is not a good idea. If you have a > key sequence, just use keyseq.print(). it would be better to change > display the shortcuts using the GUI view, not the LyX internal > representation. This is especially important on the mac. I understand > however that it would defeat the simple editing of bindings that you > have put in place. However the long term solution has to be a proper > UI (people are not supposed to know that the codes for page up/down > are prior/next, for example). Right now, I have to try to 'revert' to a bind list, and let the user do in-place modification. The problem is that I do not know qt and event handling and I have no idea how to catch keybindings when a user actually type them. As I have said, I plan to get the big parts done, and let the GUI experts polish it. I would of course appreciate it if someone can join this effort now. > This is super-ugly (but guess that you know it...). I do not like much to > see such > ugly code committed to svn, to be > frank. It has a big potential of just remaining like that. Yes. I knew they are ugly. It was difficult enough for me to figure out all the KeyMap, KeySequence, KeySymbol stuff ... This should not be the reason to commit ugly code though. > For the future, when it comes to saving the bindings, we shall find a > way to save only the differential wrt the main bind files (cua, for > ex.). Otherwise, if the all bindings are just dumped, we'll have > difficulties with upgrades. This is what I will do, and I will need another keyword \nobind to remove bindings defined in the main binding file. Is this a good idea? Do you want a separate bind configuration file \bindfile cua.bind \nobind C-I blah \bind C-Y blah or putting these in the main preference file? Cheers, Bo