function tst_keypress (do_win = false)

  h.hf = figure ();
  h.edit = uicontrol ("Style", "edit", "Units", "Normalized",
                      "Position", [0.2, 0.2, 0.6, 0.6]);
  
  set (h.edit, "KeyPressFcn", @edittest);
  if (do_win)
    set (h.hf, "WindowKeyPressFcn", @wintest);
  else
    set(h.hf, "KeyPressFcn", @wintest);
  endif

endfunction

function wintest (h, e)
  disp ("window button press");
endfunction

function edittest(h, e)
  disp ("editbox button press");
endfunction

