3

I'd like to remap my windows key to something else, but also I'd like to keep all windows key based shortcut.

In pseudo code it would be something like this:

when LWin Down until LWin Up if not LWin down abort else execute command

Nicolas Goy
  • 1,294
  • 9
  • 21

1 Answers1

4

Release the left windows key within 0,3 seconds after pressing it, to do something else (e.g. to send a):

~LWin::
KeyWait, LWin
return

~LWin Up::
Send {LWin Up}
If (A_PriorHotKey = "~LWin" AND A_TimeSincePriorHotkey < 300)
    Send, a
; else  ; another action after long press (not recommendet)
    ; Send, b
return

EDIT:

Try also this:

LWin up::
If (A_PriorKey = "LWin")
    Send a
return

; In this case its necessary to define a custom combination by using "&" or "<#" 
; to avoid that LWin loses its original function as a modifier key:

<#d:: Send #d  ; <# means LWin
user3419297
  • 9,537
  • 2
  • 15
  • 24