How to set warning messages for Escape button?

when pressing the #escape or #close button ,the popup window is closing automatically in #mendix.Checked with keyboard shortcut widgets to change the escape functionality,but its closing the page by default.How can we give warning messages in default buttons(save,select,escape,etc)?
2 answers

You could replace the default Close/Cancel button on your pop-up with a new Action button, that calls a microflow, where you can create custom logic.

Edit: and like Maarten said, you can set a confirmation message on the button

Then you can set the Close action of the pop-up to that button (in the properties window of the pop-up page), so that when someone closes the pop-up with the 'x' or presses escape, the microflow behind your custom Close button is triggered.





If you create an action/microflow button with a custom microflow you have an option to 'ask confirmation' within the microflow settings.
With this option you can create a warning message.