Open cspotcode opened 1 month ago
I have also tried to teach it to auto-close the palette if I alt-tab or click away from it. Ideally, I wish the command palette didn't appear in the alt-tab list so that when I alt-tabbed, it switched to a next non-OneNote window. But I'm guessing that would be really tricky or impossible to implement.
The next best thing is auto-closing the palette when it loses focus. So if I open the palette, then change my mind and alt-tab, it will switch focus to OneNote and the palette will close.
I realize it might seem silly for me to be opening the palette and changing my mind, but I guess that's just the way it goes when I use computers. Things get a bit frantic.
Unfortunately, stress testing this feature occasionally caused OneMore to lock up. So I don't recommend it, but I'm sharing the syntax in case anyone wants to tinker.
#Persistent
#SingleInstance, Force
SetTimer, CheckPaletteLostFocus, 100
return
#If WinActive("OneMore Command Palette") || WinActive("Quick Palette")
Escape::
WinClose, A
return
#If
CheckPaletteLostFocus:
If !WinActive("OneMore Command Palette") && !WinActive("Quick Palette")
{
If WinExist("OneMore Command Palette") || WinExist("Quick Palette")
{
WinClose, OneMore Command Palette
WinClose, Quick Palette
}
}
return
I wanted to share a small AutoHotKey script I wrote so that Command Palettes can be closed by pressing the escape key only once instead of twice. By default, OneMore opens the dropdown list by default, and pressing escape once closes the dropdown, twice closes the palette.
This Autohotkey script intercepts Escape key when a palette is open and closes the palette directly.
I hope it's helpful to anyone else who wants to tweak their OneMore setup.