Hi,
I got the following problem using the 20070130 and 20070123 snapshot on Windows XP:
I defined two tools and assigned shortcuts using Settings->Editor->Keyboard Shortcuts. Next time I started Code::Blocks the first shortcut disappeared and after the next restart both shortcuts were no longer assigned. This is reflected in the cbKeyBinder10.ini file, where the related entries disappear too.
I also tried to assign only one shortcut to one tool, but this shortcut was lost after re-start too.
Assigning shortcuts to other menu items like Help->Tips works perfectly.
So there seems to be a problem with shortcuts assigned to user-defined tools and strangely only one of those shortcuts seems to disappear each time Code::Blocks is started.
Thanks in advance for your help!
Tobias
Sorry, but the menu Tools items are rebuilt by CB each time a change is made. So any key you assign will be wiped out by the next Tools change.
I'll think about a way to solve this, but I haven't come up with a solution in a year. So, my being dense, there may not be a forthcomming fix.
There is a cludge workaround. First, make all the changes to the Tools menu. Wait 15 seconds. Then add the hotkeys to the menu items. Wait another 15 seconds. Close CB.
When you restart CB, the hotkeys should show until the next change you make to the Tools menu or until another plugin is enabled/disabled. (CB rebuilds all menu items when a plugin is enabled/disabled)
Why 15 seconds? KeyBinder scans all menu items every 15 seconds to see if CB or a plugin has change any keys. It then writes them to the cbKeyBinder10.ini file.
You might consider using KeyMacs in this case. A KeyMac like "!TC" (Alt-Tools-Config) with your chosen hotkey will not be wiped out. And it will be rebuilt each time CB rebuilds its menu system.
Another KeyMac like: "!T{DOWN}{DOWN}{ENTER}" would actual execute the second item on the Tools menu.