Skip to content

Instantly share code, notes, and snippets.

@dzolnai
Last active November 19, 2015 18:12
Show Gist options
  • Save dzolnai/079e106e4c5968afd771 to your computer and use it in GitHub Desktop.
Save dzolnai/079e106e4c5968afd771 to your computer and use it in GitHub Desktop.
AutoHotKey for remapping Windows + 1, 2, 3... to Windows + Q, W, E...
; Windows + Q calls Windows + 1
#q::
Send {LWin Down}1
Sleep 200
While GetKeyState("LWin","P")
{
KeyWait, q, D T0.3
If !ErrorLevel ; if you do press q
{
Send {Blind}1
Sleep 200
}
}
Send {LWin Up}
Return
; Windows + W calls Windows + 2
#w::
Send {LWin Down}2
Sleep 200
While GetKeyState("LWin","P")
{
KeyWait, w, D T0.3
If !ErrorLevel ; if you do press w
{
Send {Blind}2
Sleep 200
}
}
Send {LWin Up}
Return
; Windows + E calls Windows + 3
#e::
Send {LWin Down}3
Sleep 200
While GetKeyState("LWin","P")
{
KeyWait, e, D T0.3
If !ErrorLevel ; if you do press e
{
Send {Blind}3
Sleep 200
}
}
Send {LWin Up}
Return
; Windows + R calls Windows + 4
#r::
Send {LWin Down}4
Sleep 200
While GetKeyState("LWin","P")
{
KeyWait, r, D T0.3
If !ErrorLevel ; if you do press r
{
Send {Blind}4
Sleep 200
}
}
Send {LWin Up}
Return
; Windows + T calls Windows + 5
#t::
Send {LWin Down}5
Sleep 200
While GetKeyState("LWin","P")
{
KeyWait, t, D T0.3
If !ErrorLevel ; if you do press t
{
Send {Blind}5
Sleep 200
}
}
Send {LWin Up}
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment