/* LPEX default key behaviour */

/* default funtion keys   */
'SET ACTION.F2 OPENCLOSE'
'SET ACCELERATOR.LP_CLOSEVIEW F3'
'SET ACTION.F4 BLOCK COPY CLEAR'
'SET ACTION.F5 BLOCK MOVE CLEAR'
'SET ACTION.F6 ='                         /* repeat last command */
'SET ACTION.F7 SCROLL SCREEN UP'          /* same as PgUp */
'SET ACTION.F8 SCROLL SCREEN DOWN'        /* same as PgDn */
/* F9=OS/2 shell window defined below */
'SET ACTION.F11' /* set to null */
'SET ACTION.F12 FOCUS'

/* default control + function keys */
'SET ACTION.C-F1' /* set to null */
'SET ACTION.C-F2' /* set to null */
'SET ACTION.C-F3' /* set to null */
'SET ACTION.C-F4' /* set to null */
'SET ACTION.C-F5' /* set to null */
'SET ACTION.C-F6' /* set to null */
'SET ACTION.C-F7' /* set to null */
'SET ACTION.C-F8' /* set to null */

/* default shift + function keys */
'SET ACTION.S-F1' /* set to null */
'SET ACTION.S-F2' /* set to null */
'SET ACTION.S-F3' /* set to null */
'SET ACTION.S-F4' /* set to null */
'SET ACTION.S-F5' /* set to null */
'SET ACTION.S-F7   SCROLL SCREEN LEFT'
'SET ACTION.S-F8   SCROLL SCREEN RIGHT'
'SET ACCELERATOR.LP_ISSUECMD S-F9'

/* reset mouse behaviour  */
'SET ACTION.BUTTON1DOUBLE PRIMITIVE SELECTWORD'
'SET ACTION.BUTTON1DOWN ;PRIMITIVE SETCURSOR; PRIMITIVE SETPOINTER'
'SET ACTION.BUTTON1DRAG PRIMITIVE SELECTDRAG'
'SET ACTION.BUTTON2DOUBLE ;PRIMITIVE SETCURSOR; BLOCK CLEAR; BLOCK SET RECTANGLE'
'SET ACTION.BUTTON2DOWN ;BLOCK CLEAR;PRIMITIVE SETCURSOR; PRIMITIVE SETPOINTER'
'SET ACTION.BUTTON2DRAG PRIMITIVE SELECTDRAG'
'SET ACTION.S-BUTTON1DOWN PRIMITIVE SELECTDRAG'
'SET ACTION.S-BUTTON1DRAG PRIMITIVE SELECTDRAG'
'SET ACTION.S-BUTTON2DOWN PRIMITIVE SELECTDRAG'
'SET ACTION.S-BUTTON2DRAG PRIMITIVE SELECTDRAG'
'SET ACTION.C-BUTTON1DOWN ;PRIMITIVE SETCURSOR;PRIMITIVE SETPOINTER'
'SET ACTION.C-BUTTON1DRAG PRIMITIVE SELECTDRAG'
'SET ACTION.C-BUTTON1DOUBLE ;PRIMITIVE SETCURSOR;BLOCK CLEAR;BLOCK SET ELEMENT'

/* alt + key sequence  */
'SET ACTION.A-A' /* set to null */
'SET ACCELERATOR.LP_MARKCHAR A-B'
'SET ACCELERATOR.LP_COPY A-C'
'SET ACCELERATOR.LP_DELETE A-D'
'SET ACTION.A-E' /* set to null */
'SET ACTION.A-F' /* set to null */
'SET ACTION.A-G' /* set to null */
'SET ACTION.A-H' /* set to null */
'SET ACCELERATOR.LP_LOWER A-I'
'SET ACTION.A-J SPLITJOIN JOIN'
'SET ACCELERATOR.LP_UPPER A-K'
'SET ACCELERATOR.LP_MARKLINE A-L'
'SET ACCELERATOR.LP_MOVE A-M'
'SET ACCELERATOR.LP_NEXTFILE A-N'
'SET ACTION.A-O' /* set to null */
'SET ACCELERATOR.LP_PREVFILE A-P'
'SET ACCELERATOR.LP_QUICKMARK A-Q'
'SET ACCELERATOR.LP_MARKRECT A-R'
'SET ACTION.A-S SPLITJOIN SPLIT'
'SET ACTION.A-T PRIMITIVE TOPLINE'
'SET ACCELERATOR.LP_UNMARK A-U'
'SET ACTION.A-V' /* set to null */
'SET ACTION.A-W' /* set to null */
'SET ACTION.A-X PRIMITIVE ESCAPEKEY'
'SET ACTION.A-Y BLOCK FIND'
'SET ACCELERATOR.LP_OVERLAY A-Z'
'SET ACTION.A-1' /* set to null */
'SET ACCELERATOR.LP_UNDO A-BACKSPACE'
'SET ACCELERATOR.LP_END A-END'
'SET ACCELERATOR.LP_START A-HOME'
'SET ACTION.A-INS SET INSERTING AFTER'
'SET ACTION.A-LEFT  PREV VISIBLE WORD'
'SET ACTION.A-RIGHT NEXT VISIBLE WORD'

/* control + key sequences  */
'SET ACCELERATOR.LP_INCLUDEALL C-A'
'SET ACTION.C-B' /* set to null  */
'SET ACTION.C-D' /* set to null  */
'SET ACTION.C-E' /* set to null  */
'SET ACCELERATOR.LP_FINDCHANGE C-F'
'SET ACTION.C-G' /* set to null  */
'SET ACTION.C-H' /* set to null  */
'SET ACCELERATOR.LP_INCLUDE C-I'
'SET ACCELERATOR.LP_JUMP C-J'
'SET ACCELERATOR.LP_CHECK C-K'
'SET ACCELERATOR.LP_LINE C-L'
'SET ACTION.C-M MATCH'
'SET ACCELERATOR.LP_FINDNEXT C-N'
'SET ACCELERATOR.LP_OPENEDIT C-O'
'SET ACCELERATOR.LP_FINDPREV C-P'
'SET ACCELERATOR.LP_SETQUICK C-Q'
'SET ACCELERATOR.LP_SAVE C-S'
'SET ACTION.C-T PRIMITIVE SELECTWORD'
'SET ACTION.C-U' /* set to null  */
'SET ACTION.C-V' /* set to null  */
'SET ACTION.C-W' /* set to null  */
'SET ACTION.C-X' /* set to null  */
'SET ACTION.C-Y DUP'
'SET ACTION.C-Z' /* set to null  */
'SET ACTION.C-6'    /* set to null */
'SET ACTION.C-9'  /* set to null */
'SET ACTION.C-0'  /* set to null */
'SET ACTION.C-TAB'  /* set to null */

'SET ACTION.C-END BOTTOM'
'SET ACTION.C-HOME TOP'
'SET ACCELERATOR.LP_CLIPCOPY C-INS'
'SET ACTION.C-LEFT  PRIMITIVE WORDLEFT'
'SET ACTION.C-PGDN SCROLL SCREEN RIGHT'
'SET ACTION.C-PGUP SCROLL SCREEN LEFT'
'SET ACTION.C-RIGHT PRIMITIVE WORDRIGHT'

/* enter key mappings */
'SET ACTION.ENTER SPLITLINE'               /* move cursor to start of next line if exists, else this line     */
'SET ACTION.A-ENTER ;PREFIXPROCESS ;PRIMITIVE PREVIOUSTAB'
'SET ACTION.C-ENTER OPENLINE'              /* insert a new line and set cursor to it                          */

/* backspace & delete key mappings    */
'SET ACTION.C-BACKSPACE DELETE'
'SET ACTION.C-DEL PRIMITIVE TRUNCATE'
'SET ACTION.DEL DELETE2'                   /* delete characters continuously from end of file to cursor       */
'SET ACTION.BACKSPACE BACK2'               /* delete characters continuously from cursor to beginning of file */

/* escape key mapping */
'SET ACTION.ESC    PRIMITIVE TOGGLECOMMAND'

/* shift + keyboard assignments  */
'SET ACCELERATOR.LP_CLIPCUT S-DEL'
'SET ACTION.S-DOWN        PRIMITIVE SELECTDOWN'
'SET ACTION.S-END         PRIMITIVE SELECTEND'
'SET ACTION.S-HOME        PRIMITIVE SELECTHOME'
'SET ACCELERATOR.LP_CLIPPASTE S-INS'
'SET ACTION.S-LEFT        PRIMITIVE SELECTLEFT'
'SET ACTION.S-PGDN        PRIMITIVE SELECTPAGEDOWN'
'SET ACTION.S-PGUP        PRIMITIVE SELECTPAGEUP'
'SET ACTION.S-RIGHT       PRIMITIVE SELECTRIGHT'
'SET ACTION.S-UP          PRIMITIVE SELECTUP'

/* control + shift + keyboard assignments */
'SET ACTION.C-S-BACKSPACE PRIMITIVE DELETEWORD'
'SET ACTION.C-S-DOWN      PRIMITIVE SELECTWORDDOWN'
'SET ACTION.C-S-END       PRIMITIVE SELECTFILEEND'
'SET ACTION.C-S-HOME      PRIMITIVE SELECTFILEHOME'
'SET ACTION.C-S-LEFT      PRIMITIVE SELECTWORDLEFT'
'SET ACTION.C-S-PGDN      PRIMITIVE SELECTPAGERIGHT'
'SET ACTION.C-S-PGUP      PRIMITIVE SELECTPAGELEFT'
'SET ACTION.C-S-RIGHT     PRIMITIVE SELECTWORDRIGHT'
'SET ACTION.C-S-UP        PRIMITIVE SELECTWORDUP'

/* Set up window pull-down for os/2 shell */
'SET ACTIONBAR.~Windows.OS/2_command_shell\tF9 LX "OS/2 command shell" /dt SHL'

'EXTRACT VIEWNUM'
'EXTRACT VIEWLIST'
do while(viewlist \= '')
   'GOVIEW NOACT VIEWNUM 'subword(viewlist,1,1)

   'SET MENUCHECK.LP_LPEXKEYS  ON'
   'SET MENUCHECK.LP_EPMKEYS   OFF'
   'SET MENUCHECK.LP_SEUKEYS   OFF'
   'SET MENUCHECK.LP_XEDITKEYS OFF'
   'SET MENUCHECK.LP_ISPFKEYS  OFF'
   'SET MENUCHECK.LP_CUSTOMIZE OFF'
   'SET PREFIXSHOW OFF'
   viewlist = delword(viewlist,1,1)
end
'GOVIEW NOACT VIEWNUM 'VIEWNUM

'EXTRACT DOCNUM INTO DOCNUM'
"SET GLOBAL.DOC" || DOCNUM || " 'MACRO LPEX'"
