autohotkey

Auto hot key mapping to switch Control and Alt ^<+Tab::ShiftAltTab does not work


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


Solution

  • 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