Last active
August 18, 2024 15:16
-
-
Save Arax20/9493799b3aa73e1fb69af8d4f1c72ba6 to your computer and use it in GitHub Desktop.
Allows rebinding of winkey to a shortcut without getting in the way of system winkey shortcuts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
| ; #Warn ; Enable warnings to assist with detecting common errors. | |
| SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
| SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
| LWin:: | |
| Input, x, L1 ; Catches key after winkey | |
| if (ErrorLevel = "NewInput") ; If catching was interrupted | |
| { | |
| Send #+r ; Set this to your powertoys run shortcut | |
| return | |
| } | |
| Send, #%x% ; Sends caught key + winkey | |
| return | |
| ~LWin Up:: | |
| Input, , L0 ; Interrupts key catching on winkey release | |
| return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would love a better solution.