I need to add a function when i press esc key in each panel of my web application. Specifically when i press esc key in my web application i need to show a panel which alert if is need to exit from the web application.

my question is : how can do to enable esc key shortcut ?