Author : Harald Simon <harald.simon@luebeck.netsurf.de>
Date   : Sat, 14 August 1999
Version: 1.1

Copyright (c) 1999 by Harald Simon



CALL PARAMETERS

Syntax of Typewriter:

	tt [filename] [filename] ...

Typewriter excepts null, 1 or more filenames. If the file exists, the file 
is loaded. Otherwise a new file will be created.

Only one Typewriter instance is running at a time. If you invoke tt a second 
time, the call parameter are send to the running instance. In other words: 
The files are opened without to start tt a second time.



PROGRAM BEHAVE

New windows

Each Typewriter window is opened with the size 80x30 (width x height). If a new
Typewriter is invoked via File->New or Ctrl-N, the window becomes an
automatically created name like "New 1". The number will be incremented by one
with each new window. If such a new file is saved the first time, Typewriter 
ask for a filename via the standard tk file dialog. It is also allowed to call 
the menu entry "File->Save as..." to save the file directly.

Open a file

To open a file, just call the menu entry File->Open or press Ctrl-O. The
standard tk file dialog is displayed to ask for the file.

While loading a big files, within the window title is written the filename
and before the filename the bracket (#). This means, the file is currently 
loaded into the edit buffer. It is not necessary to wait with the changes of 
the file until the load into the buffer is done. The loading is done in
the background. After loading, the title of the window is just changed to the 
filename.

Change of the file

If a file has been changed, an asterix (*) is displayed before the filename 
within the window title. This is the sign, that changes needs to be saved. 
After the file is saved, within the window title is only displayed the filename.

Close a file

If a window is closed via the menu entry or Ctrl-U, Typewriter checks the state 
the window. If the file has been changed, Typewriter ask whether the file 
should be saved or not. You can cancel the close command. If a new window
is closed this way, the behave now is like explained above in "New windows". 

Find & Replace...

If a string is searched via the "Find & Replace..." dialog, the found string
is selected like a normal selection. That means, you can do all what you 
can do with a normal selection. E.g. extend, copy, cut. 

The default button - default function on key <Return> - is Find. The key
<Escape> closes this window. The search is always done on the top window. 
To change the window, in which the search has to be done, it is enough to
raise the window without closing of the "Find & Replace..." dialog. 

The popup list to get a previuosly search or replace string can be done with
the mouse or with the button <F4>. If you press <F4> again, the popup will be
closed. Also Escape closes the popup window. The select an entry of the list
with the keyboard, use <Tab> or <Return>.

Replace will at first search for the text and wait until replace is pressed 
again. If no further string can be found, a beep is emitted.

Goto...

The "Goto..." dialog take a line number of a line number plus a period and a
column number. After <Return> the dialog is withdrawn and the cursor will be 
set to the desired postion and the whole line is selected. <Escape> closes 
the dialog.

Character table...

The "Character table..." allows an easy insertion of special international 
characters. Just press on the button of the diserd character, then the 
character is inserted into the top Typewriter window.

Word wrap...

The menu entry switch the word wrap on or off. This is only done for the 
top window. All other windows will be anchaged. To switch off the word wrap, 
invoke the menu entry again.



OPTIONS

All options are set within the file tt_lib/options.tcl. Feel free to 
change the option to your likeness. Refer to the tcl/tk manual.



KEYBOARD MAPPING

Almost all functions can be called via a the keyboard. The main keystrokes
are displayed just behind the menu entry. Here a short list of useful 
keystrokes:

	Keystrokes        | Function
	-------------------------------------------------------------
	Ctrl-A or Home    | Set the cursor to begin of the current line
	Ctrl-B or Left    | Set the cursor one character back
	Ctrl-C            | Copy the selection into the clipboard
	Ctrl-D or Del     | Delete the next character
	Ctrl-E or End     | Set the cursor to the end of the current line
	Ctrl-F            | Open dialog "Find & Replace..."
	Ctrl-G            | Open dialog "Goto..."
	Ctrl-H            | Delete the previous character
	Ctrl-I            | Insert a tab-character (0x09)
	Ctrl-K            | Delete rest of line
	Ctrl-N            | Create a new Typewriter window (New File)
	Ctrl-O            | Open a file
	Ctrl-P            | One line up
	Ctrl-Q            | Quit; Exit the program 
	Ctrl-S            | Save the file in the topwindow (current window)
	Ctrl-T            | Swap the character left and right from the cursor
	Ctrl-U            | Close the current window
	Ctrl-V            | Paste the clipboard
	Ctrl-X            | Cut the selection and copy it into the clipbaord
	Ctrl-Z            | Undo the previous command
	Ctrl-Left         | One word back
	Ctrl-Right        | One word forward
	Ctrl-Up           | One paragraph up
	Ctrl-Down         | One paragraph down
	Ctrl-Del          | Delete the word right of the cursor
	Ctrl-Backspace    | Delete the word left of the cursor
	Ctrl-Home         | Go to the beginning of the text
	Ctrl-End          | Go to the end of the text

	Alt-S             | Save file as ...
	Alt-Z             | Redo an Undo of the previous command

	Shift-Left        | Extend the selection with the previous character
	Shift-Right       | Extend the selection with the next character
	Shift-Ctrl-Left   | Extend the selection with the previous word
	Shift-Ctrl-Right  | Extend the selection with the next word
	Shift-Ctrl-Up     | Extend the selection up to the previous paragraph
	Shift-Ctrl-Down   | Extend the selection to the next paragraph
	Shift-Ctrl-Home   | Extend the selection up the beginning of the text
	Shift-Ctrl-End    | Extend the selection down to the end of the text

