Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; https://autohotkey.com/board/topic/49213-find-window-state-of-active-window-maximized-or-normal/
- ; https://autohotkey.com/board/topic/83948-how-to-remap-win-key-and-retain-win-key-other-key-combos/
- $LWin::
- KeyWait, Lwin, T 0.2
- If !ErrorLevel ; if you hold the LWin key for less than 200 miliseconds...
- {
- WinGetActiveTitle, title
- WinGet, maximized, MinMax, %title%
- if (maximized)
- WinRestore, %title%
- else
- WinMaximize, %title%
- return
- }
- 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}
- Return
Advertisement
Add Comment
Please, Sign In to add comment