C
C Definitions for KEYDEFS (key definitions)
C                  
	integer*4  keydefs_name_size
	parameter (keydefs_name_size=20)
c
        integer*4 magic_keydefs_key
        parameter (magic_keydefs_key = 'KDKE')
c
c The definition of a key->function mapping
c
	structure /keydefs_key/
	  integer*4 function_idx			!pointer to function
	  integer*4 key                 		!smg-key value
	  integer*4 nk_name
	  character*(keydefs_name_size) keyname		!smg keyname
	  integer*4 nk_set
	  character*(keydefs_name_size) set_state	!set_state name
	  integer*4 nk_if
	  character*(keydefs_name_size) if_state	!if_state name
	  integer*4 nk_context
	  character*(keydefs_name_size) context		!Context name
	  integer*4 magic
	end structure
c
c The definition opf a function definition
c
        integer*4 magic_keydefs_func
        parameter (magic_keydefs_func = 'KDFU')
	structure /keydefs_function/
	  integer*4 function		!output function
	  integer*4 nk_name
	  character*(keydefs_name_size) function_name		!keyname
	  integer*4 magic
	end structure
c
        integer*4 magic_keytable
        parameter (magic_keytable = 'KEYT')
c
	structure /keytable/
	  logical*4 case_sensitive		!are keys case_sensitive
c
	  record /table/ functions
	  record /table/ keys

	  character*(keydefs_name_size) cur_state !current state
	  integer*4 magic
	  record /vm_zone/ vm_zone	!vm zone for keys/functions
	end structure
