User forums > Help

How to un-indent the code, it looks like the shift+TAB key got hooked by others

(1/2) > >>

ollydbg:
Normally, I think when I select some text in the editor, press the TAB key will indent the code, while "shift+TAB" key will un-indent the code.

But actually, I see that "shift+TAB" key just switch the editor panels, not do the "un-intent" code.

Any way to solve this issue.

I just search the forum, back in year 2007, this feature is already implemented, see here: Indent and unindent commands in Edit.

I just looked at the key-binding(short-cut key) plugin's setting, I don't see any "indent" or "un-indent" command in the menus.

Pecan:
Shift-Tab is a global key binding hard coded in main.cpp.
It has special handling in keybinder contrib.

It works here for HEAD revision.
Keybinder tries to keep your previous key bindings even when the Main menu assignments get changed. It may have gotten confused.

Try this to get keybinder to rebuild the keybindings.
1) disable keybinder
2) Restart CodeBlocks
3) Does shift-tab now work?

4) Enable Keybinder
5) restart Codeblocks
6) Does shift-tab still work?

What rev are you using, so I can try to re-create the problem.

ollydbg:

--- Quote from: Pecan on July 03, 2023, 07:07:08 am ---Shift-Tab is a global key binding hard coded in main.cpp.
It has special handling in keybinder contrib.

It works here for HEAD revision.

--- End quote ---
Hi, thanks for the reply. I'm using the latest svn HEAD version I build several hours ago(rev 13317). Once I build a new version, I just copy all the files in the src\output32_64 to the installed folder to overwrite the old ones.



--- Quote ---Try this to see if it's being overridden by another plugin.
1) disable keybinder
2) Restart CodeBlocks
3) Does shift-tab now work?
--- End quote ---
I just did this, and "shift-tab" works in this case.




--- Quote ---4) Enable Keybinder
5) restart Codeblocks
6) Does shift-tab still work?
--- End quote ---
Strange, "shift-tab" works OK now.

So, my guess is that disable the keybinder and enable it fixes some wrong configuration?  :)



Miguel Gimenez:
Panel switching is associated to Ctrl-Tab, somehow it is converted inside Keybinder to Shift-Tab (wrong flag?).

Pecan:
Looks to me like Keybinder is getting confused by the new HEAD configuration vs users previous CB configuration.

At startup, Keybinder merges its view of the menu structure with the users previous <personality>.Keybinder20.conf, and rewrites it.

Disabling/Re-enabling keybinder makes it do a clean rebuild of both it's view of the current menu structure and the users previous settings.

I suspect that keybinder is mistakenly using the global keybinding id of a previous CB version instead of the current HEAD setting during the merge of old to new bindings.  Global key bindings are a bitch to handle. They have no label. If an old (or non-existent) id is assigned to the global, it'll be connected to a galaxy far far away.

I'll take a look at it. It'll take some time.
Debugging Keybinder is always a time sink.

Reference: main.cpp line 761
m_pAccelEntries[6].Set(wxACCEL_SHIFT,                 WXK_TAB,   idShiftTab);

@Miguel Gimenez
Are you saying that you are experiencing that Ctrl-Tab is doing the function of Shift-Tab ?

Navigation

[0] Message Index

[#] Next page

Go to full version