******************************************************************************
*                                                                            *
*     Name: K850USET.DEF                                                     *
*                                                                            *
* Function: This contains the default ELEP2 keyboard mapping for the         *
*           following envirnoment:                                           *
*                                                                            *
*           Code Page/s      : 850                                           *
*                              437                                           *
*           Country/ies      : United States                                 *
*           PC   Keyboard/s  : Enhanced                                      *
*                              PC/AT                                         *
*           Host Keyboard/s  : APL (12 PF Keys)                              *
*           Author/s         : Kenneth Kahn                                  *
*                              Al Dunsmuir                                   *
*                                                                            *
******************************************************************************
*
*----------------------------------------------------------------------------
* Declare available Host scan codes
*----------------------------------------------------------------------------
*
DECLARE `          = 0x3D
DECLARE 1          = 0x21
DECLARE 2          = 0x22
DECLARE 3          = 0x23
DECLARE 4          = 0x24
DECLARE 5          = 0x25
DECLARE 6          = 0x26
DECLARE 7          = 0x27
DECLARE 8          = 0x28
DECLARE 9          = 0x29
DECLARE 0          = 0x20
DECLARE minus      = 0x30
DECLARE equal      = 0x11
DECLARE backspace  = 0x31
DECLARE tab        = 0x36
DECLARE q          = 0x70
DECLARE w          = 0x76
DECLARE e          = 0x64
DECLARE r          = 0x71
DECLARE t          = 0x73
DECLARE y          = 0x78
DECLARE u          = 0x74
DECLARE i          = 0x68
DECLARE o          = 0x6E
DECLARE p          = 0x6F
DECLARE cent       = 0x1B
DECLARE \          = 0x15
DECLARE backtab    = 0x35
DECLARE capslock   = 0x4C
DECLARE a          = 0x60
DECLARE s          = 0x72
DECLARE d          = 0x63
DECLARE f          = 0x65
DECLARE g          = 0x66
DECLARE h          = 0x67
DECLARE j          = 0x69
DECLARE k          = 0x6A
DECLARE l          = 0x6B
DECLARE ;          = 0x7E
DECLARE '          = 0x12
DECLARE {          = 0x0F
DECLARE return     = 0x08
DECLARE <          = 0x09
DECLARE z          = 0x79
DECLARE x          = 0x77
DECLARE c          = 0x62
DECLARE v          = 0x75
DECLARE b          = 0x61
DECLARE n          = 0x6D
DECLARE m          = 0x6C
DECLARE ,          = 0x33
DECLARE .          = 0x32
DECLARE /          = 0x14
*
* Special 3278/79 Function Keys
*
DECLARE attn       = 0x50
DECLARE cursorsel  = 0x51
DECLARE chgfmt     = 0x52
DECLARE eraseinput = 0x53
DECLARE eraseeof   = 0x55
DECLARE test       = 0x57
DECLARE dup        = 0x5F
DECLARE fieldmark  = 0x5E
DECLARE insert     = 0x0C
DECLARE delete     = 0x0D
DECLARE up         = 0x0E
DECLARE down       = 0x13
DECLARE left       = 0x16
DECLARE right      = 0x1A
DECLARE reset      = 0x34
DECLARE spacebar   = 0x10
DECLARE enter      = 0x18
*
* PF keys
*
DECLARE pf1        = 0x40
DECLARE pf2        = 0x41
DECLARE pf3        = 0x42
DECLARE pf4        = 0x43
DECLARE pf5        = 0x44
DECLARE pf6        = 0x45
DECLARE pf7        = 0x46
DECLARE pf8        = 0x47
DECLARE pf9        = 0x48
DECLARE pf10       = 0x49
DECLARE pf11       = 0x4A
DECLARE pf12       = 0x4B
*
* Ordinal Values for elep2kbd.DLL
*
DECLARE elep2kbd    = 0xFF
*
* Function Values for elep2kbd.DLL
*
DECLARE skipword   = 1
*
*----------------------------------------------------------------------------
*
*----------------------------------------------------------------------------
* Define Keyboard in terms of Host scan codes
*----------------------------------------------------------------------------
*------------------------
* Standard character keys
*------------------------
*
* lower case letters
*
DEFINE  a = a
DEFINE  b = b
DEFINE  c = c
DEFINE  d = d
DEFINE  e = e
DEFINE  f = f
DEFINE  g = g
DEFINE  h = h
DEFINE  i = i
DEFINE  j = j
DEFINE  k = k
DEFINE  l = l
DEFINE  m = m
DEFINE  n = n
DEFINE  o = o
DEFINE  p = p
DEFINE  q = q
DEFINE  r = r
DEFINE  s = s
DEFINE  t = t
DEFINE  u = u
DEFINE  v = v
DEFINE  w = w
DEFINE  x = x
DEFINE  y = y
DEFINE  z = z
*
* upper case letters
*
DEFINE  A = S-a
DEFINE  B = S-b
DEFINE  C = S-c
DEFINE  D = S-d
DEFINE  E = S-e
DEFINE  F = S-f
DEFINE  G = S-g
DEFINE  H = S-h
DEFINE  I = S-i
DEFINE  J = S-j
DEFINE  K = S-k
DEFINE  L = S-l
DEFINE  M = S-m
DEFINE  N = S-n
DEFINE  O = S-o
DEFINE  P = S-p
DEFINE  Q = S-q
DEFINE  R = S-r
DEFINE  S = S-s
DEFINE  T = S-t
DEFINE  U = S-u
DEFINE  V = S-v
DEFINE  W = S-w
DEFINE  X = S-x
DEFINE  Y = S-y
DEFINE  Z = S-z
*
* Numbers
*
DEFINE  1 = 1
DEFINE  2 = 2
DEFINE  3 = 3
DEFINE  4 = 4
DEFINE  5 = 5
DEFINE  6 = 6
DEFINE  7 = 7
DEFINE  8 = 8
DEFINE  9 = 9
DEFINE  0 = 0
*
*-----------------------
* Standard PF Keys
*-----------------------
*
DEFINE  F1            = pf1
DEFINE  F2            = pf2
DEFINE  F3            = pf3
DEFINE  F4            = pf4
DEFINE  F5            = pf5
DEFINE  F6            = pf6
DEFINE  F7            = pf7
DEFINE  F8            = pf8
DEFINE  F9            = pf9
DEFINE  F10           = pf10
DEFINE  F11           = pf11
DEFINE  F12           = pf12
*
*------------------------
* Alternate F11, F12 defs
*------------------------
*
DEFINE  A-F1            = A-pf1
DEFINE  A-F2            = A-pf2
*
*-----------------------
* Special Function keys
*-----------------------
*
* Erase Input
*
DEFINE  A-F3            = A-eraseinput
*
* Erase EOF
*
DEFINE  A-F4            = eraseeof
*
* Erase EOF (E/MYTE compatible)
*
DEFINE  C-E             = eraseeof
*
* Test
*
DEFINE  A-F5            = A-test+noqueue
*
* System Request
*
DEFINE  A-F6            = A-attn+noqueue
*
* CP78 Main menu
*
DEFINE  A-F7            = menu
*
* Attn
*
DEFINE  A-F8            = attn+noqueue
*
* PA1 and PA2
*
DEFINE  A-F9            = A-dup+noqueue
DEFINE  A-F10           = A-fieldmark+noqueue
*
* Reset
*
DEFINE  S-ESC           = reset+noqueue
*
* Reset for VIO Window
*
DEFINE  C-R             = reset+noqueue
*
* Clear
*
DEFINE  ESC             = A-cursorsel
*
* Enter
*
DEFINE  Enter           = enter
DEFINE  PadEnter        = enter
*
* New line
*
DEFINE  S-Enter         = return
DEFINE  +               = return
*
* Delete
*
DEFINE  PadDel          = delete
DEFINE  Delete          = delete
*
* Insert
*
DEFINE  PadIns          = insert
DEFINE  Insert          = insert
*
* Cursor movement (normal speed)
*
DEFINE  PadUp           = up+noqueue
DEFINE  Up              = up+noqueue
DEFINE  PadDown         = down+noqueue
DEFINE  Down            = down+noqueue
DEFINE  PadLeft         = left+noqueue
DEFINE  Left            = left+noqueue
DEFINE  PadRight        = right+noqueue
DEFINE  Right           = right+noqueue
*
* Cursor movement (double speed)
*
DEFINE  C-PadUp         = up up
DEFINE  C-Up            = ScrollUp
DEFINE  C-PadDown       = down down
DEFINE  C-Down          = ScrollDown
DEFINE  C-PadLeft       = left left
DEFINE  C-Left          = ScrollLeft
DEFINE  C-PadRight      = right right
DEFINE  C-Right         = ScrollRight
*
DEFINE  A-Up            = up up
DEFINE  A-Down          = down down
DEFINE  A-Left          = left left
DEFINE  A-Right         = @elep2kbd.skipword
*
* Page movement
*
DEFINE  PadPgUp         = pf7
DEFINE  PageUp          = pf7
DEFINE  PadPgDn         = pf8
DEFINE  PageDown        = pf8
*
* Home
*
DEFINE  PadHome         = A-backtab
DEFINE  Home            = A-backtab
*
* MLT Jump Session Hot-Key
*
DEFINE   C-S            = A-insert+noqueue
*
* MLT for Enhanced Keyboard
*
DEFINE   A-insert       = A-insert+noqueue
*
* Advance to End of line
*
DEFINE  PADend          = endofline
DEFINE  End             = endofline
*
* Backspace
*
DEFINE  BackSpace       = left delete
*
* Tab keys
*
DEFINE  Tab             = tab
DEFINE  S-Tab           = backtab
*
* Special Symbols
*
DEFINE    Space         = spacebar
DEFINE    .             = .
DEFINE    ,             = ,
DEFINE    `             = `
DEFINE    ~             = S-`
DEFINE    !             = S-cent
DEFINE    @             = S-2
DEFINE    #             = S-3
DEFINE    $             = S-4
DEFINE    %             = S-5
DEFINE    ^             = S-6
DEFINE    &             = S-7
DEFINE    *             = S-8
DEFINE    (             = S-9
DEFINE    )             = S-0
DEFINE    _             = S-minus
DEFINE    S-+           = S-equal
DEFINE    \             = \
DEFINE    {             = {
DEFINE    }             = S-{
DEFINE    ;             = ;
DEFINE    :             = S-;
DEFINE    '             = '
DEFINE    "             = S-'
DEFINE    <             = <
DEFINE    >             = S-<
DEFINE    /             = /
DEFINE    ?             = S-/
DEFINE  equal           = equal
DEFINE  minus           = minus
*
* "cent" - uses '[' key
*
DEFINE    [             = cent
*
* "solid vertical bar" (EBCDIC X'4F')
*
*   1) use ']' key
*
DEFINE    ]             = S-1
*
*   2) use C-\ key
*
DEFINE                 = S-1
*
* "broken bar" or "pipe" (EBCDIC X'6A')
*
DEFINE    |             = S-\
*
*
*----------------------------------------------------------------------------
* Define user macro(s)
*----------------------------------------------------------------------------
*
*----------------------------------------------------------------------------
* Define keys that access external DLL functions
*----------------------------------------------------------------------------
*
* A-k : Access the 1st KEYBOARD table in elep2kbd.$L$
*
DEFINE  A-K     = @elep2kbd.0x102
*
* A-p : Access the 2nd KEYBOARD table in elep2kbd.$L$
*
DEFINE  A-P     = @elep2kbd.0x202
*
*----------------------------------------------------------------------------
* Define Keys for Document Assist Feature
*----------------------------------------------------------------------------
*
* Ctrl-d  -  Turn Feature ON
*
DEFINE  C-D             = A-chgfmt
DEFINE  C-F             = chgfmt
DEFINE  C-G             = A-up

*----------------------------------------------------------------------------
* Define Default Key Delay.
*----------------------------------------------------------------------------
SET KeyDelay =  0

*------------------------------------------------------------------*
*                                                                  *
* Terminal IDs :  2  =  3278/79 Model-2  (24x80)                   *
*                 3  =  3278/79 Model-3  (32x80)                   *
*                 4  =  3278/79 Model-4  (43x80)                   *
*                 5  =  3278/79 Model-5  (27x132)                  *
*                                                                  *
*------------------------------------------------------------------*/
SET TermID1 = 2
SET TermID2 = 4
SET TermID3 = 2
SET TermID4 = 2

Define M2     = menu
Define R-Ctrl = enter
