#
# Copyright (c) 1987 Regents of the University of California.
# All rights reserved.	The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
#
#	@(#)map3270	1.1 (Berkeley) 11/20/87
#
#
# /etc/map3270 (/usr/new/etc/map3270 before migration)
# mail corrections and additions to "termcap"
#
# this file contains mappings between characters entered from the keyboard,
# and 3270 keys, for use by programs (like tn3270) doing 3270 emulation
# from unix.
#
# inside the single quotes, a caret ("^") introduces a control character
# sequence (rub out = ^?, by the way).	also inside the single quotes,
# a backslash ('\') introduces an escaped character.  Also, \n, \r, \t,
# are all as in c, and \E is another way of representing escape.
#
#	NOTE that while we are defining lots of function, much of that
# function (ie: local editing keys) may not yet be available from
# tn3270.

linux {

    centsign = '\Ec';					# Alt-c
    clear = '\E[P';					# Pause
    enter = '\E^m';					# Alt <-'
    reset  = '\Er';					# Alt-r

    nl	  = '^m';					# <-'
    tab   = '^i';					# --->|
    btab  = '\E^I';					# |<---
    left  = '\E[D' | '\EOD';				# Left
    right = '\E[C' | '\EOC';				# Right
    up	  = '\E[A' | '\EOA';				# Up
    down  = '\E[B' | '\EOB';				# Down
    dp	  = '\Ed';					# Shift-Ins
    fm	  = '\Ef';					# Shift-Home
    cursel = '\E.';					# Alt-.

    home  = '\E[1~';					# Home
    insrt = '\E[2~';					# Insert
    delete= '\E[3~';					# Delete
    fieldend = '\E[4~'; 				# End
    eeof  = '^e';					# Ctrl-End
    einp  = '\Ee';					# Alt-End
    pfk7  = '\E[5~';					# Page Up
    pfk8  = '\E[6~';					# Page Down
    treq = '\Et';					# Alt-Pause

    erase = '^?';					# Backspace
    ferase = '\E^_';					# Alt-Bksp
    werase= '^_';					# Alt-Delete
    wordtab = '^r';					# Ctrl-Right
    wordbacktab = '^l'; 				# Ctrl-Left
    wordend = '\E\E[4~';				# Esc,End

    # numeric keypad
    enter = '\EOM';					# Enter
    pa1   = '\EOP';					# NumLock
    pa2   = '\EOQ';					# Keypad/
    pa3   = '\EOR';					# Keypad*
    treq  = '\EOS';					# Keypad-
    tab   = '\EOl';					# Keypad+
    delete= '\EOn';					# Keypad.
    insrt = '\EOp';					# Keypad0
    fieldend = '\EOq';					# Keypad1
    down  = '\EOr';					# Keypad2
    pfk8  = '\EOs';					# Keypad3
    left  = '\EOt';					# Keypad4
    reshow= '\EOu';					# Keypad5
    right = '\EOv';					# Keypad6
    home  = '\EOw';					# Keypad7
    up	  = '\EOx';					# Keypad8
    pfk7  = '\EOy';					# Keypad8

    # program attention keys
    pa1 = '\Ep1' | '\EP1' | '^p1';			# Alt-Ins
    pa2 = '\Ep2' | '\EP2' | '^p2';			# Alt-Home
    pa3 = '\Ep3' | '\EP3' | '^p3';			# Alt-PgUp

    # pf keys
    pfk1 = '\E[[A';
    pfk2 = '\E[[B';
    pfk3 = '\E[[C';
    pfk4 = '\E[[D';
    pfk5 = '\E[[E';
    pfk6 = '\E[17~';
    pfk7 = '\E[18~';
    pfk8 = '\E[19~';
    pfk9 = '\E[20~';
    pfk10= '\E[21~';
    pfk11= '\E[23~';
    pfk12= '\E[24~';
    pfk13= '\E[25~';
    pfk14= '\E[26~';
    pfk15= '\E[28~';
    pfk16= '\E[29~';
    pfk17= '\E[31~';
    pfk18= '\E[32~';
    pfk19= '\E[33~';
    pfk20= '\E[34~';
    pfk21= '\E[36~';
    pfk22= '\E[37~';
    pfk23= '\E[38~';
    pfk24= '\E[39~';

    # local control keys
    master_reset = '\E\E\E';			# reset and reshow
    escape = '\E]';				# to telnet prompt
    flinp  = '\E\Ef' | '\E\EF'; 		# flush input
    reshow = '\E\Er' | '\E\ER'; 		# refresh screen
#   disc   = '\E\Ed' | '\E\ED'; 		# disconnect (suspend)
#   sync   = '\E\Es' | '\E\ES'; 		# in sync with user

    # local editing keys
    settab = '\E;';
    deltab = '\E\'';
    clrtab = '\E:' | '\E+';
    setmrg = '\E(';
    sethom = '\E!';
    coltab = '\Ei' | '\EI';
    colbak = '\Eb' | '\EB';
    indent = '\El' | '\EL';
    undent = '\Eh' | '\EH';

} # end of linux
