CtrlTab command analogous to AltTab

Propose new features and changes
vsl
Posts: 3
Joined: 11 Nov 2023, 18:03

CtrlTab command analogous to AltTab

11 Nov 2023, 18:32

The AltTab command: https://www.autohotkey.com/docs/v2/Hotkeys.htm#alttab
It would be useful to have a similar CtrlTab command to be able to switch tabs in a browser and other programs by a custom hotkey.
Saiapatsu
Posts: 17
Joined: 11 Jul 2019, 15:02

Re: CtrlTab command analogous to AltTab

13 Nov 2023, 23:34

The existence of the AltTab function seems unusual to me in the first place.
I guess that AHK needs to do something special to manipulate the Alt-Tab menu properly and Send "!{Tab}" doesn't cut it.

But because there's no OS-level Ctrl-Tab thing going on, you can simply remap your key to Ctrl-Tab without issues, no CtrlTab function needed.

Code: Select all

h::+^Tab
l::^Tab
ExampleFunction()
{
	MouseGetPos &x, &y
	if y < 30
		Send "^{Tab}"
}
vsl
Posts: 3
Joined: 11 Nov 2023, 18:03

Re: CtrlTab command analogous to AltTab

14 Nov 2023, 05:37

@Saiapatsu Send "^{Tab}" will not trigger the Ctrl-Tab menu.
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: CtrlTab command analogous to AltTab

16 Nov 2023, 20:44

What do you suppose that CtrlTab will do, exactly? All it can do is send keystrokes. Whatever key sequence you use to activate the menu normally, you just need to replicate that with Send. Ctrl-tab menus are not a standard/system construct, and as such may behave differently in different applications, or even different configurations of the same application.
vsl
Posts: 3
Joined: 11 Nov 2023, 18:03

Re: CtrlTab command analogous to AltTab

25 Dec 2023, 06:26

@lexikos I want to reassign Ctrl+Tab functionality (like cycling through the tab list in a browser) to another key combination. Send "^{Tab}" will just switch between the latest tabs and release the menu.
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: CtrlTab command analogous to AltTab

18 Jan 2024, 22:28

@vsl, I guess you miss my point. How would you activate such a menu without the script? You would not press and release Ctrl+Tab, because that would "switch between the latest tabs and release the menu". I presume you would press and hold Ctrl and press and release Tab. You need to figure out the individual events - such as press Ctrl = {Ctrl down}, release Ctrl = {Ctrl up}, press and release Tab = {Tab} - and send them at appropriate times. What exactly "appropriate times" means may depend on the application, because Ctrl-Tab menus are not a standard/system construct.

There is nothing that a built-in CtrlTab construct could do that can't already be done with the existing constructs. It would only be less flexible.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 123 guests