"AnyKey" to cancel a given action

I'd like to change "Resize window below cursor" only resizes from bottom-right. - #26 by esv script from having to hold a key to the following:

  • on some key down it would enter a "window resize" mode
  • ANY key or mouse click would perform cancellation steps (currently bound to key up in the linked preset)

at the same time this any key/mouse click binding should be inactive

I think the last part could be achieved by showing some tiny floating menu and having a conditional group that is only active when this floating menu is shown.

But I don't understand how to trigger for any key, only specific keybinds?