I want to make ESC key work as an exit button (like if you press back button on android, but for all targets that cmp supports), but I wasn't able to find a proper solution. I saw some advices to use onKeyEvent, but it makes so that you should always request focus on the Box (which isn't ideal, since it prevents using text fields and other). What's the correct way to do it?
(reposting this, because it seems like I posted it to the wrong channel last time)