User forums > Help

Shift-TAB does not work

<< < (2/3) > >>

ollydbg:

--- Quote from: AndrewCot on November 23, 2021, 03:13:14 am ---It works for me on my latest local build and in the official 20.03 release. I think the keystroke may be assigned to something non standard, but it could also be a bug in the version you are using.

I am not familiar with this area of C::B, but I would check the following:
1) "Settings->Editor->Keyboard Shortcuts" and check the "View->Switch tabs" setting (5th from the bottom) and check it's still Ctrl-TAB.
2) In your C:\users\<name>AppData\Roaming\Codeblocks\default.cbKeyBinder20.conf file check following entry (Search for Shift-TAB) as this may be set to something non standard. This is my entry.
    }, {
   "description": "<global><unbound>",
   "accelerator": "Shift-TAB",
   "resourceID": "798",
   "parentMenu": ""
  }, {

--- End quote ---

The interesting thing is I just removed the "CTRL-TAB" in the Keyboard Shortcuts plugin, which is assigned to "View->Switch tabs".
And now the "SHIFT-TAB" works.

So, it looks like  "CTRL-TAB" and "SHIFT-TAB" are the same?  :)

BlueHazzard:
I have a other issue with switch tabs:
Normally alt+ arrow key should activate the browsetracker switch editor, but for me it activates the switch tab dialog?

Pecan:

--- Quote from: BlueHazzard on December 06, 2021, 01:34:07 am ---I have a other issue with switch tabs:
Normally alt+ arrow key should activate the browsetracker switch editor, but for me it activates the switch tab dialog?

--- End quote ---

My guess: that these keys are being switched around because different versions of CB are being used with the same personality.

KeyBinder resets a key to the default menu assignment if a  user assigned key is no longer in the menu.

For example, if I've assigned Alt-left to a BrowserTracker menu item, then load a CB that does not enable BrowserTracker, the Alt-left gets lost in the personality=default keybinder .conf file.

If a previous assignment of ctrl-tab was assigned to say HexEditor, then I load a CB which has no HexEditor plugin, then the ctrl-tab will default back to the core CB assignment (switch tabs).

The only way around this is to use personality=<whatever> so key assignments don't get lost.

I have a personality=cb315 and a personality=cb30 etc.
I use a .bat file to set the personality for it's associated CB.

Just my guess.
 

BlueHazzard:
Can be... This happened after updating c::b but all version should have installed the plugin...
Anyway, my next question is, where is the binding for switch tabs/open documents? i have not found it...

Pecan:

--- Quote from: BlueHazzard on December 06, 2021, 09:00:24 am ---Can be... This happened after updating c::b but all version should have installed the plugin...
Anyway, my next question is, where is the binding for switch tabs/open documents? i have not found it...

--- End quote ---

main.cpp line 763
--- Code: ---    // New: Allow drag and drop of files into the editor
    SetDropTarget(new cbFileDropTarget(this));

    // Accelerator table
    m_AccelCount = 8;
    m_pAccelEntries.reset(new wxAcceleratorEntry[m_AccelCount]);
    m_pAccelEntries[0].Set(wxACCEL_CTRL | wxACCEL_SHIFT,  (int) 'W', idFileCloseAll);
    m_pAccelEntries[1].Set(wxACCEL_CTRL | wxACCEL_SHIFT,  WXK_F4,    idFileCloseAll);
    m_pAccelEntries[2].Set(wxACCEL_CTRL,                  (int) 'W', idFileClose);
    m_pAccelEntries[3].Set(wxACCEL_CTRL,                  WXK_F4,    idFileClose);
    m_pAccelEntries[4].Set(wxACCEL_CTRL,                  WXK_F6,    idFileNext);
    m_pAccelEntries[5].Set(wxACCEL_CTRL | wxACCEL_SHIFT,  WXK_F6,    idFilePrev);
    m_pAccelEntries[6].Set(wxACCEL_SHIFT,                 WXK_TAB,   idShiftTab);
    m_pAccelEntries[7].Set(wxACCEL_CTRL | wxACCEL_ALT,    WXK_TAB,   idCtrlAltTab);
    m_pAccel.reset(new wxAcceleratorTable(m_AccelCount, m_pAccelEntries.get()));

    SetAcceleratorTable(*m_pAccel);

--- End code ---

Here's another possibility.
Let's say a user has an old (personality=default) and the Alt-Left key had an id=1234 in the old menu id.

The user then loads a new CB (personality=default also) which has Alt-Left key id=5678.

Keybinder will do it's best to resolve the conflict. But if another key, say Ctrl-A, has id=1234 Keybinder has to honor the Ctrl-A and drop the Alt-Left.

In general, Keybinder resolves assignments by:
1) Assign all keys in the .conf file the menu id.
2) If multiple .conf keys have the same menu id, the menu wins.

In both cases, a key could get switched around because the old menu id and the .conf menu id did not match, the .conf key was missing in the menu, or two keys in the .conf had the same menu id.

The best way around all these problems is to use separate personalities for each CB version you load.

Also watch out that when debugging, the personality might default to "debug". It'll overwrite debug.cbKeyBinder20.conf every time you close the debug session. Or if you don't set a personality, the debug session will overwrite the default.cbKeyBinder20.conf.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version