I would like to remap Tab key in such a way that:

  1. On Tab key down it BEHAVES AS WINDOWS(SUPER) KEY waits for extra key like ex: m or t and perform some action like maxize window(ex: WIN+m, WIN+t). It waits, and Tab repeating is blocked.
  2. On Tab key Up(alone) with no extra key, Tab key behave like normal Tab key (one Tab character)

How to write such an AutoHotKey script?

Send, {LWinDown}
KeyWait, Tab
if ( A_PriorKey = "LWinUp")
    Send, {LWinUp}          
    Send, {Tab}         

For the moment I have such a general solution but it still repeats Tab.


Due to similar issues of Alt Tab described in Autohotkey documentation. I decide to remap Win key to Tab key using SharpKeys software (Windows registry modification) and then apply ahk script

    KeyWait LWin, T0.15
    If !ErrorLevel ; if you hold the LWin key for less than 200 miliseconds...
        Send {Tab}
    Else ; but if it is held for more than that...
        Send {LWin Down} ; ...hold LWin down
    KeyWait LWin ; and, in both cases, wait for it to be released
    Send, {LWin Up}

It is more stable and more universal solution than scripting Tab key directly with ahk: Answer related to: Win Up key as Tab key instead Windows Menu1

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.