Is it possible to close UMG widgets with escape?

One more comment:

I seem to run into problems when the root widget is a canvas panel. Once I click on it, the function isn’t triggered anymore. But when I wrap the canvas panel in a border widget, everything works fine.