Menu

#1589 Multiple keyboard shortcuts not saved properly

Undefined
wont-fix
pecan
None
Bug_Report
6 days ago
2026-02-28
Gmeeorh
No

This seems to be a bug in the keyboard shortcuts plugin:
If I add a keyboard shortcut to a command which is already bound to a shortcut, the new shortcut is not active any more when restarting C::B.
In my case I wanted to add "Ctrl-Tab" to the command "Switch tabs" which is already bound to the shortcut "Crtl-,".

Some observations:
It seems the shortcut file default.cbKeyBinder20.conf is not modified properly.
When adding the shortcut "Ctrl-Tab", a new entry is added to the file:
{ "description": "<global>Switch between open editor tabs",
"accelerator": "Ctrl-,",
"resourceID": "-2275",
"parentMenu": "" }</global>

The problem seems to be that "parentMenu" is empty. If I add the proper value "&View::Switch tabs" manually, everything seems to work fine.

Discussion

  • pecan

    pecan - 2026-03-05
    • assigned_to: pecan
     
  • pecan

    pecan - 6 days ago

    There are some key bindings that the Keyboard plugin cannot screw around with.
    Some of those bindings include the Ctrl-C, Ctrl-V, and any key that is hardcoded globally by CodeBlocks itself.

    One of those hard coded keys is the global binding Ctrl+Tab. It's hard coded into the global accelerator table during start-up and has special programming for Linux and Windows.

    Since it is already a global key binding, when the plugin asks for the parent menu item, CodeBlocks returns an empty string for good reason. If the plugin owned the binding the special programming for the key would be bypassed.

    To show this, When there is no parent binding for ctrl-tab (as should be the case), the dialog for ctrl-tab opens and then ctrl-tab can then be used to cycle through the list by tapping the tab key while holding down the ctrl key. If It is bound to the plugin this feature is missing. The the menu item for ctrl-tab is there just to tell the user that ctrl-tab is assigned to the tab switching functions.

    The menu item is not directly bound to the special functions. Only the global ctrl-tab in the global accerator table is.

     

    Last edit: pecan 6 days ago
  • pecan

    pecan - 6 days ago
    • status: open --> wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB