If the window manager has a passive grab on that keybinding (it most likely does), you won't be able to handle this. Otherwise, this breaks the window manager.

You should let the window manager decide what to do on such keybindings - if you want to minimize when focus is lost then do that on the focus lost event and not on alt-tab.