function dokeypress(HG)
% DOKEYPRESS  Handle key press functions for plot editor figures

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.7 $  $Date: 1997/12/06 00:21:10 $

key = double(get(HG,'CurrentCharacter'));

if isempty(key)
   return
end

switch key
case {8 127} % Backspace and Delete
   cutcopypaste(HG,'clear');   
case 24 % ctrl-X
   cutcopypaste(HG,'cut');
case 3  % ctrl-C
   cutcopypaste(HG,'copy');
case 22 % ctrl-V
   cutcopypaste(HG,'paste');
end
