set ctrl+shit+tab and ctrl+tab for switching tab in chrome

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jazuly
Posts: 1
Joined: 15 Jan 2018, 23:32

set ctrl+shit+tab and ctrl+tab for switching tab in chrome

15 Jan 2018, 23:39

how to create script for switching tab in chrome?

here what i try

NumPad7:: Send, {ctrl}{tab}
Return

NumPad8:: Send, {ctrl}{shit}{tab}
Return
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: set ctrl+shit+tab and ctrl+tab for switching tab in chrome

16 Jan 2018, 16:33

When you send just the key name (ex. Send, {ctrl}), it simulates pressing the key and then releasing it. In other words, it sends the down command for the key and then the up command. When you want a key to be held down, you want to send just the down command, so what you want is this:

Code: Select all

Numpad7::Send, {ctrl down}{tab}{ctrl up}
Numpad8::Send, {ctrl down}{shift down}{tab}{shift up}{ctrl up}
FYI, adding Return is unnecessary when the hotkey has only a single command, so I removed them.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: set ctrl+shit+tab and ctrl+tab for switching tab in chrome

16 Jan 2018, 16:37

Try also:

Code: Select all

Numpad7::Send, ^{Tab}
NumpadHome::Send, ^{Tab}
Numpad8::Send, ^+{Tab}
NumpadUp::Send, ^+{Tab}

;e.g.
;Numpad7:: ;works when NumLock is on
;NumpadHome:: ;works when NumLock is off
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 308 guests