Way for focusing the window under mouse on demand

If somebody could kindly tell me if there is a way to bind some script/function to focus the window currently under mouse.

That is: I press a key and a window under currently under the mouse pointer gets focus.

:slight_smile:

I’ve looked at MouseFocus and SloppyFocus so far, can not seem to get it.

So you don’t want to automatically focus the window your mouse is hovering on, but you want to focus it using a key - with or without raising it?

Key KEYSYM A A PointerWindow Focus