title: How to capture key press in Matlab uipanel
body: <p>How can one capture keyboard entry inside a uipanel, i.e. when anything in the panel has focus? I've found that <code>uipanel</code> does not have the <code>KeyPressFcn</code> property. I've read <a href="http://undocumentedmatlab.com/blog/uicontrol-callbacks" rel="nofollow">this post</a> from Undocumented Matlab about Java callbacks, but I also can't get <code>KeyPressedCallback</code> to work. For example, if I try to this:</p>
  
  <pre><code>set(h_panel, 'KeyPressFcn', @(src, event)key_press(obj, src, event));
  </code></pre>
  
  <p>I get this error:</p>
  
  <p><code>The name 'KeyPressFcn' is not an accessible property for an instance of class 'uicontrol'.</code></p>
  
  <p>The same thing occurs if I try <code>KeyPressedCallback</code>. I'm afraid I'll have to resort to some sort of hack involving the parent figure, which I would like to avoid if possible.</p>