How to prevent closing ctools modal window with ESC?
I had similar kind of a problem. I had to disable closing modal popup by pressing ESC.
In my case solution was adding unbind for modalEventEscapeCloseHandler for page where I was going to get modal popup:

&lt;?php
      drupal_add_js('
      jQuery(document).ready(function(){
        jQuery(document).unbind("keydown", modalEventEscapeCloseHandler);
      });
      ', 'inline');
?&gt;