Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

TCEdit Tab Switching using Ctrl + 1, 2, ... 8

Aug
2,831
149
TCEdit currently allows switching between open tabs using Ctrl + Tab.

In addition,
it would be great if switching between opens tabs using Ctrl + 1, 2, ... 8 could be added to TCEdit.

Joe
 
After some testing with TCEdit,
I understand what you are saying.

Using the mouse,
I took tab 5 (tcc.ahk),
and dragged it to become tab 1.

Regardless of where I place the tab,
it will still always be tab 5.

1741628805555.webp


Microsoft Edge works differently,
that is,
if I drag tab 5 to tab 1,
Pressing the Ctrl+1 keyboard combination will activate whatever is in tab 1.

Maybe the Microsoft RTL works differently for Microsoft Edge.

I've added hotkeys to my AutoHotKey tcc.ahk to do what I want,
so now I can do Tab switching using Ctrl + 1, 2, 3, ... 8,
in TCEdit,
but I must remember not to re-arrange my tabs,
once they are open.

Joe
 
According to Microsoft CoPilot, the code is not Microsoft Code.

Instead, it is Google Chromium Code.

Here's a high-level example of what the logic might involve (in C++):
C++:
void TabStripModel::MoveTab(int from_index, int to_index) {
    std::unique_ptr<Tab> moved_tab = std::move(tabs_[from_index]);
    tabs_.erase(tabs_.begin() + from_index);
    tabs_.insert(tabs_.begin() + to_index, std::move(moved_tab));
    RenumberTabs();  // Hypothetical helper for renumbering.
}

This is just a conceptual outline; you'd need to look into the actual Chromium source code for precise implementation. You can browse the Chromium repository at Chromium Git for specific details. If you're customizing or studying Chromium, understanding the TabStripModel and related files is a good starting point.

Ref: chromium/src - Git at Google

Joe
 
Back
Top