
/*	TNIX/Unix Version
Keyshell Version Number 2	*/
/*
 *
 * help  Version 0.5  9AUG83  (Vax/Unix)
 *
 * This is the master script for building the `help' session file.
 *
 */

main
{
>\kintro\e - Describes ColorKey+ and explains the actions of the static
>            function keys.
>
#ifndef _TNIX
>\kindex\e - Searches the online UNIX reference manual for entries containing
#else
>\kindex\e - Searches the online TNIX reference manual for entries containing
#endif
>            keywords you have specified, then lists those entries.  If you
>            enter multiple keywords, you will get a list of the manual
>            entries that contain \uall\n of those keywords.
>
>            You can use the \kmanual\e key to examine any of the listed
>            entries. 
>
>\kmanual\e - Displays a reference manual entry on your screen or prints 
>            it on the lineprinter.
>
>\kdone\e - Cancels a command being built or returns you to the previous set
>            of key labels. 
>
	msg (^Select ColorKey+ introduction or the index, manual or done actions:  %%);

	f1;intro; {
>
>
>                        ColorKey+ User Interface
>
>\uColorKey+\n is a user interface that assists you in using your computer.  A
>set of labels will be drawn on the terminal's screen that correspond 
>to "function" keys on the keyboard.  When you press one of these "function"
>keys, some action associated with the corresponding label will be taken.
>
>The keys now shown will produce the following actions:
>
>\khardkeys\e - Explains the actions when the static function keys are 
>            pressed.  These keys are "hard" because the static keys 
>            will perform the same action regardless of the current 
>            labels printed on the screen.
>
>\kdone\e - Cancels a command being built or returns you to the previous set
>            of key labels. 
>
		sly (history off),
		sly (shiftkey 4), 
		sly (history on),
		msg (^Select a function key: %%);
		f1;hardkeys;{
>
>These actions are performed when the static function keys are pressed:
>
>F1 - \khelp\e - Invokes this help program.
>F2 - \kwhereami\e - Shows current level and place in the label hierarchy.
>F3 - \kexpand\e - Expands the key label to its full name.
>F4 - \kexplain\e - Explains the current set of labels and the actions 
>                 that will be taken when any one is pressed.
>F5 - \kredraw\e - Redraws the ColorKey+ labels on the screen.
>F6 - \khist fwd\e - Invokes the line editor and scans the command history 
>                 list forward.
>F7 - \khist back\e - Invokes the line editor and scans the command history 
>                 list backwards.
>F8 - \klast cmd\e - Executes the previously executed command.
>
			sly (history off),
			sly (shiftkey 4), 
			sly (history on),
			break (2);
		};
		f8;done;msg,cmd,break;
	};
	f2;index; {
>
>Enter the topic or topics for which you want to search the reference manual
>index.  The index command accepts a wide range of topics and synonyms. 
>
#ifndef _TNIX
		cmd (^apropos ), 
#else
		cmd (^index ), 
#endif
		msg (^Enter index topic\(s\) \(separate with spaces\): %p), 
		msg(^Searching the index...), exec, msg, break (1);
		f7;manual; 
#ifndef _TNIX
			man (apropos);
#else
			man (index);
#endif
		f8;done; msg, cmd, break;
		
	};
	f3;manual; {
>
>\kon screen\e - Displays a manual entry on your terminal screen.
>
>\kprint\e - Prints a manual entry on the lineprinter.
>
>\kboth\e - Prints a manual entry and displays it on your terminal screen.
>
		msg (^Select on-screen display, printing, or both: %%);
		f1;on screen; {
>
>Enter the name of a reference manual entry.  To get a list of the entries
>pertaining to a specific topic or topics, press \kdone\e and then \kindex\e.
>
			cmd (^man ), msg (^Name the manual entry you would like to see: %p), msg(^Fetching manual page...),  exec, msg, break (2);
			f7;manual; man (man);
			f8;done; msg, cmd, break (2);
			
		};
		f2;print; {
>
>Enter the name of a reference manual entry.  To get a list of the entries
>pertaining to a specific topic or topics, press \kdone\e and then \kindex\e.
>
			cmd (^man ), 
			msg (^Name the manual entry you would like to print: %p), 
#ifndef _TNIX
			cmd ( | lpr), 
#else
			cmd ( | lp1r), 
#endif
			msg(^Sending the manual page to the printer...), 
			exec, break (2);
			f7;manual; man (man);
			f8;done; msg, cmd, break (2);
			
		};
		f3;both; {
>
>Enter the name of a reference manual entry.  To get a list of the entries
>pertaining to a specific topic or topics, press \kdone\e and then \kindex\e.
>
			cmd (^man ), msg (^Name the manual entry you would like to print and display: %p), 
#ifndef _TNIX
			cmd ( | lpr; man $1), 
#else
			cmd ( | lp1r; man $1), 
#endif
			msg(^Fetching the manual page for print and display...), exec, msg, break (2);
			f7;manual; man (man);
			f8;done; msg, cmd, break (2);
			
		};

		f7;manual; man (man);
		f8;done; msg, cmd, break (1);
		
	};
	f8;done; sly (exit);

}
