title: Catching a keyboard keypress in a MATLAB GUI
body: <p>I am using matlab and I want to have radio buttons, with some keys mapped to it.</p>
  
  <p>The following code works for displaying radio button and taking values from the user. Can someone help me map keys 1 for Female and 2 for Male.</p>
  
  <pre><code>hgen_radio = uibuttongroup('visible','on','Units','pixels','Position',[1750 1045 170,50],'Title','Gender');
  set(hgen_radio,'SelectionChangeFcn',@isMale_Callback);
  ugen0 = uicontrol('Style','Radio','String','Male',...
      'pos',[10 5 50 25],'parent',hgen_radio,'HandleVisibility','off');
  ugen1 = uicontrol('Style','Radio','String','Female',...
      'pos',[70 5 70 25],'parent',hgen_radio,'HandleVisibility','off');
  set(hgen_radio,'SelectedObject',[]);
  </code></pre>
  
  <p>Thanks in advance!</p>