;   In order to be effective, changes to this file must be acted upon
;   by PK.EXE.
;
;   PK.EXE should be executed in the pE directory (where pe.exe is)
;
;   PK [key.txt]
;
; 
;          IF YOU'RE NOT SURE OF WHAT YOU'RE DOING - PLEASE MAKE A         
;                 COPY OF KEY.PED BEFORE YOU RUN PK.EXE                    
; 
;
;   Data following semi-colons are treated as commentary
;
;   Key names are defined as follows
;
;          f1 - means function key F1
;         ^f1 - means control key and F1
;         #f1 - means shift key and F1
;         @f1 - means alt key and F1
;
;   two keys can be used for a single command as
;   long as the keys in the sequence are joined with an
;   underscore character, like this: ^a_c
;
;   note, however, that the first key in a two key sequence cannot
;         then be used as a single key.  So, in the above sequence,
;         ^a (alone) could not also be assigned a function.  It would have
;         no effect.
;
;   one or more spaces follow each field and are field separators
;
;   The ordering of keys in this file is arbitrary, put it in whatever
;   order you feel is logical.
;
;   While a function may have more than one key assigned, the same key
;   cannot be used for more than one function.
;
; Note Note Note Noteͻ
;                                                                        
;  If you use a key that is currently assigned to a macro, pE will       
;  reassign the macro to functions that you may not want it to.  We      
;  have to do this or you would not be able to execute, save, or         
;  reassign the macro.  pE will change the assignment when it starts.    
;  To save the macro, and use the key for the function specified in      
;  this file, please do the following:                                   
;                                                                        
;           1.  Show Macros to see what macros you have and what keys    
;               they are assigned.                                       
;                                                                        
;           2.  'UnAssign' (^-) any macros that are not assigned to keys 
;               you want them assigned to.                               
;                                                                        
;           3.  Change the text assignment of the macro to whatever key  
;               you want.                                                
;                                                                        
;           4.  Compile the macro. (^F9).                                
;                                                                        
;           5.  Save Options (^F2).                                      
;                                                                        
; ͼ
;   Note that key names go in field one, functions in field two.
; 1      2    ;and these are comments just as any line that begins with a ;

^^_^a   ^a              ;these assignments allow the keyin
^^_^b   ^b              ;of any literal control character by
^^_^c   ^c              ;first typing ^ (control circumflex)
^^_^d   ^d              ;followed by the control character you
^^_^e   ^e              ;want.
^^_^f   ^f
^^_^g   ^g
^^_^h   ^h
^^_^i   ^i
^^_^j   ^j
^^_^k   ^k
^^_^l   ^l
^^_^m   ^m
^^_^n   ^n
^^_^o   ^o
^^_^p   ^p
^^_^q   ^q
^^_^r   ^r
^^_^s   ^s
^^_^t   ^t
^^_^u   ^u
^^_^v   ^v
^^_^w   ^w
^^_^x   ^x
^^_^y   ^y
^^_^z   ^z
^^_^[   ^[
^^_^\   ^\
^^_^]   ^]
^^_^^   ^^

^^_^_   ^_

`       LastAscii       ;this character will produce the last character the
                        ;ascii window was set to - if ascii window is never
                        ;called it will be itself.
;
; f1 - f10
;

f1      QuickHelp       ;Brings up a one page quick help file/then manual
f2      JumpNext        ;jump (cycle) to next window number
f3      SaveFile        ;writes file from memory to disk (uses assigned name)
f4      SaveFileAs      ;Allows filename change before saving
f5      FindForward     ;find a string from cursor towards "bottom"
f6      FindBackward    ;find a string from cursor towards "top"
f7      SetLineLength   ;sets word wrap margin when NOT in word process mode
f8      PrevMark        ;position cursor to saved location (SetMarks)
f9      GoTo            ;go to line number, offset (hex edit), or bookmark
f10     SwapDown        ;Swaps current line with one below, cursor remains

; extended keyboard only

f11     OpenFile        ;opens a file in current window
f12     EditFile        ;edits an existing file in new window

; shift f1 - f10

#f1     ExecuteCommand  ;provides a menu of all commands and keystrokes
#f2     JumpPrev        ;jump to previous window
#f3     SaveAllFiles    ;Saves all modified files
#f4     StackWin        ;minimize all windows into 'stacks'
#f5     DefineFind      ;defines find string (and initiates search)
#f6     DefineReplace   ;Sets search and replace strings
#f7     FloatBlock      ;move a column block of text with arrow keys or mouse
#f8     JumpZoom        ;maximize a window when jumped to
#f9     ShowMacros      ;shows any currently assigned macros
#f10    SwapUp          ;Swaps current line with one above, cursor remains

#f11
#f12

; control f1 - f10

^f1     RecordMacro     ;assign multiple keystrokes/commands to a single key
^f2     SaveOptions     ;save all settings (including macros) to env.ped
^f3     OpenDosWindow   ;open a window with the text from DOS screen
^f4     Maximize        ;maximizes current window
^f5     ToggleCase      ;make find case sensitive or not
^f6     ToggleWordprocess ;sets automatic paragraph alignment as you type
^f7     SetTabs         ;set tab stops, detab increment and tabs/blanks
^f8     SetMarks        ;store position of cursor
^f9     CompileMacro    ;compiles macros
^f10    UndoPara        ;will undo last paragraph alignment

; extended keyboard only

^f11
^f12

; alt f1 - f10

@f1  AsciiChart      ;allows you to choose any ASCII character
@f2  Calendar        ;dates
@f3  ColumnAdd       ;adds one or more blank columns to whole file at cursor
@f4  Minimize        ;minimize current window
@f5  RegularExp      ;turns "regular expression" (patterns) on/off
@f6  FindBLock       ;finds one or more blocked lines, moves block to there
@f7  ToggleAutoTab   ;when on, tabs/shifttabs after { or }
@f8  ColumnDelete    ;Deletes one or more columns at cursor
@f9  SetParagraphStyle   ;set left, right, indent and paragraph alignment
@f10 StartUp         ;can be assigned a series of commands to be executed
                     ;when pE begins - not recommended for reassignment!

; extended keyboard only

@f11
@f12

; alt a-z

@A  AlignParagraph   ;formats paragraph
@B  BlockMarkColumn  ;marks a rectangular area of file
@C  CascadeWin       ;arranges windows in overlapped fashion
@D  DosCommand       ;goes to DOS to execute specified command
@E  Menu            ;another way to get to menu
@F  Menu            ;another way to get to menu
@G  ToggleGraphics   ;redefines qwerty keyboard into graphics characters
@H  Menu            ;another way to get to menu
@I  EditIncludeFile  ;opens a file enclosed in < > on current cursor row
@J  JumpList         ;shows all open windows, allows selection
@K  KloseWindow      ;closes current window
@L  BlockMarkLines   ;marks a block of lines
@M  MoveBlock        ;inserts a marked block in front of cursor
@N  NewFile          ;clears current window to edit a "new file"
@O  Menu            ;another way to get to menu
@P  PrintLines       ;prints file to printer or file (F3 after @p)
@Q  QuickExit&Save   ;Saves file and exits (if changed)
@R  DefineReplace    ;Another way to get the replace dialog up.
@S  Menu            ;another way to get to menu
@T  TileWindows      ;Arranges windows in 2, 3, or 4 'Tiles'
@U  UnmarkBlock      ;Un mark a block
@V  ViewOnly         ;Open a file in uneditable window.
@W  Menu            ;another way to get to menu
@X  Exit             ;Exits with prompt to save changed files
@Y  DefineTag        ;Allows saving of 26 'bookmarks' for later goto
@Z  ZoomWindows

; alt 1 - 0

@1  BoxSingleLine    ;draws a single line box around a marked rectangle
@2  BoxDoubleLine    ;draws a double line box around a marked rectangle
@3  BoxTwoDown       ;double down single across
@4  BoxTwoAcross     ;double across single down
@5  BoxThickLine     ;thick line box
@6  BoxAsciiDash     ;top row dashes, down with +
@7  BoxAsciiEquals   ;top row equals, down with +
@8  BoxAsciiPlus     ;all pluses
@9  BoxAsciiStars    ;all stars
@0  BoxUnDo          ;Undoes last column block operation

@-  ManifestFilename  ;inserts current filename at cursor
@=  ManifestCalcValue ;inserts calculater register at cursor

; numeric keypad

Home    Home            ;cursor moves to beginning of line/edge of window
End     End             ;cursor moves one past end character

^Home   DeleteToBol     ;Delete to Beginning of Line
^End    DeleteToEol     ;Delete to End of LIne

Ins     Ins             ;characters typed are inserted/replaced
Del     Del             ;the character above the cursor is deleted

Up      Up              ;cursor moves one line up, same column
Right   Right           ;cursor moves one character right, same row
Down    Down            ;cursor moves one line down, same column
Left    Left            ;cursor moves one character right, same row

^i      TabRight        ;cursor moves one tab stop to right
#tab    TabLeft         ;cursor moves one tab to left
                        ;if ins is on, tab will "push" all characters to right
                        ;of cursor one tab stop, if off only cursor moves

                        ;if block is marked, all lines in block move one tab

Grey/   /               ;'special' key as are the grey '*', '-' & '+'
                        ;if not assigned to a function, assign to themselves
Grey*   CopyToScrap     ;copies line/marked block to scrap

Grey-   Cut             ;"cuts" the marked block (or a single line) to "scrap"
                        ;also called clipboard, buffer....
Grey+   Paste           ;"pastes" the contents of the "scrap" into file;
                        ;the effect differs depending on Ins/Replace mode.
                        ;#cut and #paste are not user assignable keys
                        ; OutputBlock and InsertDelBlock are the names of the
                        ; commands (see ^q_c and ^q_b)

                        ;#Cut cuts text to file pb$$$$.ped(no affect on scrap)
                        ;#Paste pastes text from  pb$$$$.ped (not from scrap)

PgUp    PgUp            ;displays previous screen of file
PgDn    PgDn            ;displays next screen
^PgUp   FileTop         ;positions to first line of file
^PgDn   FileBottom      ;positions to last line of file


^Right  WordRight       ;moves cursor to start of next word
^Left   WordLeft        ;moves cursor to start of prev word

; control key combinations

^a_b    AddBlock        ;adds up a block (hopefully) of numbers

^a_c    Center          ;center text in block or between margins
^a_l    LeftFlush       ;left flush text
^a_r    RightFlush      ;right flush text

^c      Calculator

^d_d    DateEntry       ;enter the date into file at cursor
^d_t    TimeEntry       ;enter the time into file at cursor

^Del    UndeleteBlock   ;deleted with del key

^e      RightEdge       ;move cursor to right edge of window (east)
^w      LeftEdge        ;move cursor to left edge of window (west)

^h      BackSpace       ;delete the character to the left of the cursor

^f      DefineFind      ;defines find string (and initiates search)

^k_k    BlockMarkStream ;marks a block beginning at the current cursor
                        ;position one character at a time
                        ;holding the control key while dragging the mouse
                        ;will also mark this kind of block
                        ;shift and arrow keys will also work
                        ;this command is provided a key sequence primarily
                        ;for macro assignment.

^k_f    FillBlock       ;allows filling a block with a specified character

^k_d    SingleSpace     ;deletes blank lines from cursor on or within block
^k_l    LowerCase       ;lower cases all characters in block
^k_u    UpperCase       ;upper cases all characters in block
^k_m    MoveBlock       ;moves the specified block to new location
                        ; - does a cut from old location and a paste in new
^k_n    DoubleSpace     ;inserts a blank line between each line
^k_s
^k_t    MarkWord        ;marks a single word
^k_w    WriteBlock      ;allows a range of marked lines to be written to file
^k_x    RestoreLine     ;restores line if edit has not been "committed"

^m      Enter           ;action depends on Ins/Replace; generally moves
                        ;one line down in file

^n      InsertLine      ;inserts a blank line and positions cursor on it

^o      OtherCase       ;Switch to other case, character for character

^q_c    OutputBlock     ;cuts block to pb$$$$.ped (see #cut and #paste)
^q_b    InsertDelBlock  ;merges text from pb$$$$.ped (only)

^q_l    LeaveEditorNow  ;exits editor - NO SAVES or PROMPTS, just exits.

^q_n    WordCount       ;counts words within spaces.

^q_j    JoinLine        ;concatenates next line onto current line
^q_i    DupLine         ;duplicates from cursor on and inserts that text onto
                        ;next line, will also replace if Replace is on.
^q_w    ParagraphUp     ;moves cursor to paragraph above this one
                        ; also #pgup (shift page up)
^q_z    ParagraphDown   ;moves cursor to paragraph below this one
                        ; also #pgdn (shift page down)

^r      RepeatChar      ;repeats a character or command a specified number
                        ;of times
^s      SortBlock       ;sorts a block in ascending ascii order.

^t      DeleteWord      ;deletes next word
^bs     DeletePrevWord  ;deletes the word to the left of the cursor
^y      DeleteLine      ;deletes the current line (yank)
^q_y    DeleteToEol     ;deletes from the cursor to end of line, also ^end
^u      UndeleteAny     ;undeletes the just deleted line, word, or segment

^Up     CursorToTop     ;positions line cursor is on to the top of the window
^5      CursorToCtr     ;positions line cursor is on to center of window
^Down   CursorToBot     ;positions line cursor is on to bottom row of window

^v_h    HorizontalRuler ;puts a horizontal ruler on the screen
^v_v    VerticalRuler   ;puts a vertcal ruler on screen
^v_u    ToggleUnixLines ;allows Unix ASCII files to be read and written
^v_x    ToggleLines     ;changes video display from 25 to 43/50 lines & back

^v_t    CursorToTop     ;positions line cursor is on to the top of the window
^v_c    CursorToCtr     ;positions line cursor is on to center of window
^v_b    CursorToBot     ;positions line cursor is on to bottom row of window

^v_e    ToggleReadOnly  ;Allows editing of read only file and vice_versa

^v_a    ASCIIChart      ;calls ASCII window

^x      ToggleHex       ;file is edited in "hex dump" mode

Esc     CancelOp        ;ESC key generally cancels operation

^\      ToggleMacro     ;turns macro processing on/off
^-      ClearMacro      ;undefines a macro

; extended keyboard extra keys

@Enter  OpenLine     ;remaining characters on line are pushed to next line
                        ;cursor remains stationary

^Grey/  AboutpE      ;displays name of user who installed pE
^Grey-  GetPrev      ;duplicates key above cursor on current line
^Grey+  WrapLines       ;wraps long lines on input (only)
^Grey*  AppendToScrap   ;marked text is added to current contents of scrap
^Ins    VisibleSpaces   ;Makes blanks visible/invisible

^]      MatchBrace      ;locate the corresponding brace, parend or bracket

@Home   SizeWindow   ;allows window to be sized
@End    MoveWindow   ;allows window to be moved

@Up     ScrollUp     ;scrolls text down (not the cursor)
@Down   ScrollDown   ;scrolls text up
@Left   ScrollLeft   ;etc, etc, etc,
@Right  ScrollRight  ;etc, etc, etc,

@PgUp   PageTop      ;grey one
@PgDn   PageBottom   ;grey one
@Ins    LeaveBlanks  ;do NOT trim blanks from end of lines
@Del    HardDelete   ;Blocks deleted with HardDelete cannot be restored
@/                   ;so, be carefull!!!!!
@Tab    OptionMenu   ;calls up the option menu to set different flags

;
; commands below are not assigned to any keys
;

AllWindows           ;sets the find to search through all windows
OpenWindow           ;Open a shiny new Window
MergeFile            ;Inserts a file in front of current cursor row.
Delay                ;sets execution delay in macros
FoundList            ;Build a list of found items and put into FIND.PED
IgnoreEOf            ;ignore End of File, allows macros to proceed past eof
SetBackup            ;sets backup directory path
SetColors            ;changes the colors of windows, menus and messages
SetCursor            ;sets cursor size and shape
SetInsRpl            ;sets Ins/Rpl mode on startup
ToggleAutoIndent     ;turns automatic indent on/off
ToggleBorders        ;allow/disallow borders
ToggleDecHex         ;set either decimal or hex offsets (hex edit only)
ToggleMenu           ;turns menu line on/off
ToggleMenu           ;turns menu on/off
VideoOFf             ;for macros, hides screens writes, until VideoON
VideoON              ;for macros, turns screen writes on again
