tabs switching with AHK

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tedy
Posts: 323
Joined: 17 Jun 2009 21:48

tabs switching with AHK

Post by tedy »

Using the very popular AutoHotKey free program I assigned many keys and keys+mouse buttons to behave in a particular way in many programs.
Here with XY I made it so Ctrl+buttons 4 and 5 activate Ctrl+Tab and Ctrl+Shift+Tab.
This is very useful for me - Ctrl+MouseBack switches to previous tabs, while Ctrl+Forward goes to the next tab. Way too easier than aiming the tabbar with the cursor when you want to go 2-3 tabs away. Easier even than pressing three keys - Ctrl, Shift, Tab.
I know the scroll works there when you point the tabbar, but still you have to go and point the tiny tabbar.
Also, if the mouse driver supports the scroll tilting, you could make it so left-tilt switches tabs backward, right-tilt -> forward. I use a Logitech mouse so I didn't want to mess my system with the buggy setpoint so I cannot use the tilt in AHK.

I think a nice setup.

By the way, an option to use Ctrl+digit would be nice when one wants to activate a particular tab directly using the keyboard. The "digit" could reflect the relative position in the tabbar. This approach allows for a maximum of 10 tabs but would be nice.
I use AHK in a similar way, but with programs in the taskbar - bery useful to bring to front any window I want, with some hotkey.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: tabs switching with AHK

Post by serendipity »

tedy wrote:Using the very popular AutoHotKey free program I assigned many keys and keys+mouse buttons to behave in a particular way in many programs.
Here with XY I made it so Ctrl+buttons 4 and 5 activate Ctrl+Tab and Ctrl+Shift+Tab.
This is very useful for me - Ctrl+MouseBack switches to previous tabs, while Ctrl+Forward goes to the next tab. Way too easier than aiming the tabbar with the cursor when you want to go 2-3 tabs away. Easier even than pressing three keys - Ctrl, Shift, Tab.
I know the scroll works there when you point the tabbar, but still you have to go and point the tiny tabbar.
Also, if the mouse driver supports the scroll tilting, you could make it so left-tilt switches tabs backward, right-tilt -> forward. I use a Logitech mouse so I didn't want to mess my system with the buggy setpoint so I cannot use the tilt in AHK.

I think a nice setup.

By the way, an option to use Ctrl+digit would be nice when one wants to activate a particular tab directly using the keyboard. The "digit" could reflect the relative position in the tabbar. This approach allows for a maximum of 10 tabs but would be nice.
I use AHK in a similar way, but with programs in the taskbar - bery useful to bring to front any window I want, with some hotkey.
I quickly skimmed this, so maybe i missed your point. Maybe you can use seltab command? Add for example "seltab 1;" in UDC and assign your shortcut (ctrl+1).
Is that what you asked?

tedy
Posts: 323
Joined: 17 Jun 2009 21:48

Re: tabs switching with AHK

Post by tedy »

serendipity wrote:I quickly skimmed this, so maybe i missed your point. Maybe you can use seltab command? Add for example "seltab 1;" in UDC and assign your shortcut (ctrl+1).
Is that what you asked?
Wonderful! :)
Thanks.
That's exactly what I had in mind!
Since there is no Ctrl+digit shourtcuts I can assign, I found Alt+digit to be even more convenient.
Alt+1 activates the first tab, Alt+2 the next, etc.
Thanks again.
I should take my time and learn a bit of the scripting someday when I have time.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: tabs switching with AHK

Post by serendipity »

tedy wrote:
serendipity wrote:I quickly skimmed this, so maybe i missed your point. Maybe you can use seltab command? Add for example "seltab 1;" in UDC and assign your shortcut (ctrl+1).
Is that what you asked?
... Since there is no Ctrl+digit shourtcuts I can assign, ...
Well, you can assign Ctrl+Digit if you first remove it from "Tools | Customize Keyboard Shortcuts..." category "Miscellaneous".

Post Reply