Remap a key but keep its functionality to another shortcut? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MatanCl
Posts: 10
Joined: 05 Jun 2021, 06:26

Remap a key but keep its functionality to another shortcut?

Post by MatanCl » 21 May 2022, 05:51

Hi,

Is there a way to use AHK to remap the Ctrl+Tab as a message, but keep the functionality of this combination for different keys, like Shift+Tab?

For instance,

Code: Select all


^Tab::msg()
+Tab::switchTabs()

msg() {
	msgBox, Use  Shift+Tab instead.
}
switchTabs() {
	; Switch between tabs on Chrome, Edge, Visual Studio Code, etc.
}

Thanks! :D
Last edited by MatanCl on 21 May 2022, 06:08, edited 1 time in total.

User avatar
mikeyww
Posts: 26856
Joined: 09 Sep 2014, 18:38

Re: Remap a key but keep its functionality to another shortcut?

Post by mikeyww » 21 May 2022, 08:34

Code: Select all

^Tab::msg()             ; CTRL-TAB
!Tab::switchTabs()      ; ALT-TAB
+Tab::MsgBox, Shift Tab ; SHIFT-TAB

msg() {
 MsgBox, Use Shift+Tab instead.
}

switchTabs() {
 MsgBox, switchtabs
}

Post Reply

Return to “Ask for Help (v1)”