function varargout = zeigeASCII(varargin)
% ZEIGEASCII M-file for zeigeASCII.fig

% Last Modified by GUIDE v2.5 29-Jan-2007 15:19:44

% Begin initialization code - DO NOT EDIT
   gui_Singleton = 1;
   gui_State = struct('gui_Name',       mfilename, ...
                      'gui_Singleton',  gui_Singleton, ...
                      'gui_OpeningFcn', @zeigeASCII_OpeningFcn, ...
                      'gui_OutputFcn',  @zeigeASCII_OutputFcn, ...
                      'gui_LayoutFcn',  [] , ...
                      'gui_Callback',   []);
   if nargin && ischar(varargin{1})
       gui_State.gui_Callback = str2func(varargin{1});
   end

   if nargout
       [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
   else
       gui_mainfcn(gui_State, varargin{:});
   end
% End initialization code - DO NOT EDIT


% --- Executes just before zeigeASCII is made visible.
function zeigeASCII_OpeningFcn(hObject, eventdata, handles, varargin)
   % Choose default command line output for zeigeASCII
   handles.output = hObject;
   % Update handles structure
   guidata(hObject, handles);


% --- Outputs from this function are returned to the command line.
function varargout = zeigeASCII_OutputFcn(hObject, eventdata, handles) 
   % Get default command line output from handles structure
   varargout{1} = handles.output;


% --- Executes on key press over figure1 with no controls selected.
function figure1_KeyPressFcn(hObject, eventdata, handles)
   % Zeichen zur Taste in Variable c speichern 
   c = get( hObject, 'CurrentCharacter' );
   
   % Zeichen als Integer-Wert
   ascii = sprintf( '%d', c );  
   % Zeichen in hexadezimaler Darstellung
   hex = sprintf( '%x', c );
   
   % in Textfelder eintragen
   set( handles.text2, 'String', ascii );
   set( handles.text5, 'String', hex );
   
   guidata(hObject, handles);
