Reputation: 3161
I'd like to use the following Auto Hot Key shortcuts to switch CTRL and ALT:
LCtrl & Tab::AltTab
return
^<+Tab::ShiftAltTab
return
But I've got an error The AltTab hotkey "^<+Tab" must specify which key (L or R).
Changed then I get another error: ... must have exactly one modifier/prefix.
<^<+Tab::ShiftAltTab
return
I found my question asked on Reddit too but no answer there: https://www.reddit.com/r/AutoHotkey/comments/bb5xlv/tab_for_alttab_tab_for_shiftalttab_how
Upvotes: 1
Views: 249
Reputation: 2243
After researching this issue much more than I would like to admit, here is what I came up with:
<^Tab::AltTab
<+Tab::ShiftAltTab
The only glitch with this is that you additionally can do the reverse alt tab operation (i.e. shift + ctrl + tab) by only pressing shift + tab when ctrl has not been pressed. But in my eyes this is not an issue as long as shift + ctrl + tab works as it should, which it does in this case.
I have only tested this with AutoHotKey v2, so it may or may not work with v1.
Upvotes: 0
Reputation: 10543
Try this
; LCtrl + Tab
<^Tab::
Send, {Alt Down}{Tab}
KeyWait, LCtrl ; waits for LCtrl to be relesead
Send, {Alt Up}
return
; LCtrl + LShift + Tab
<^<+Tab::
Send, {Alt Down}{Shift Down}{Tab}
KeyWait, LCtrl
KeyWait, LShift
Send, {Alt Up}
return
Upvotes: 1