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

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.10 $  $Date: 2000/06/01 02:53:17 $

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
