Get the currently focused window
This is the window with keyboard focus, which isn't always a window of hs.application.frontmost(): panels that take focus without activating their app (such as Spotlight's search panel) are returned too.
hs.application.frontmost()
The focused window, or nil if none
Get the currently focused window
This is the window with keyboard focus, which isn't always a window of
hs.application.frontmost(): panels that take focus without activating their app (such as Spotlight's search panel) are returned too.