Skip to content

Instantly share code, notes, and snippets.

@AkazaRenn
Last active April 15, 2025 01:16
Show Gist options
  • Select an option

  • Save AkazaRenn/887c4787321c3563f73ae1ecd0419323 to your computer and use it in GitHub Desktop.

Select an option

Save AkazaRenn/887c4787321c3563f73ae1ecd0419323 to your computer and use it in GitHub Desktop.
Use space key to trigger PowerToys Peek on File Explorer
#HotIf WinActive("ahk_class CabinetWClass")
Space:: {
classNN := ControlGetClassNN(ControlGetFocus("A"))
if ((classNN == "DirectUIHWND2") || (classNN == "Microsoft.UI.Content.DesktopChildSiteBridge1"))
Send("^{Space}")
else
Send("{Space}")
}
#HotIf
#HotIf WinActive("ahk_exe PowerToys.Peek.UI.exe")
Space::^Space
#HotIf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment