Manage events popup

Hello, I have created a popup with a tree attached, I would like to capture the events and click esc to handle the closing of the popup so controlled.it is possible to have an example of managing such events
thanks

Hello
I need to specify: do you want to close popup with “Esc” key and save the changes already made it the tree?

Hi, actually I don’t want the popup to close when “esc” is pressed (or when the user clicks out of the popup window). What I want is to get notified of these actions whenever a user does so. I want to manage such events by my customised code
thanks

At this moment popup doesn’t support such functionality. We can tell where it is necessary to change a code.