title: how to handle javascript keybindings considering a stacked layer context?
body: <p>Lets say I have a <code>&lt;body&gt;</code> with a <code>full modal</code> opened. This modal can be closed by pressing <strong>[ESC]</strong> key.
  Within this <code>full modal</code>, the user can open another, smaller modal, which can also be closed by pressing <strong>[ESC]</strong> key. How do you handle the <strong>[ESC]</strong> key and close the 'higher' layer, preventing the keypress to propagate and close the other layers that are listening to keypress?</p>
  
  <p>I'm expecting a straight answer, using preventDefault or something similar.. I'm not considering to setup some kind of service that makes many checks before deciding which layer should be closed.. To me, this thing should work kinda like clicks events, propagating upwards. Is this doable?</p>