# 
# TN (c) D.Maloff 
# configuration & keyboard mappings
#

# Say them we're emulating..

#TERM   %TERM%
TERM	at386
#TERM	vt100
#TERM	cons25r
#TERM	ANSI

# Environment vars to export (var.names will be uppercased while exporting): 
#   var <var> [<value>]
# If an empty <value> given, value of <var> from the current environment
# will be used.

# Well-known vars:
#var	user
var	display
var	systemtype	OS/2
# Export a uservar:
#var	my_var
# Export a local var and change it's name:
#var	remote_name	%local_name%

# Default command when shelling to OS

#shell		cmd.exe

# Clipboard server (insert here it's full path, just not to mess it
# with another clipserv.exe -- there are a lot of them outthere.
# Ours is comaptible with FTE's one, by Marko Macek <Marko.Macek@snet.fer.uni-lj.si>

#clipserv	c:\\bin\\clipserv.exe
clipserv	clipserv.exe 

# Terminal history size (lines)

historysz	400

# Run mouse support

mouse

# Don't send extended scancodes (without "map xxx yyy")

nofx

# Disable ``\n'' -> ``\r\n'' translation for output of the remote
# (backward translation is done by ``map \xd \xd\xa'' statement, see below)

#nl-only

# Send debugging output for TELNET protocol to this console 

#debug-TELNET	10

# Emulate italic (ESC[3m) using this color 

italic		0x4F

# Emulate underscore (ESC[4m) using this color

underscore	0x01

# User can enter terminal history using (default) alt+pgup, and than return
# to the normal processing by pressing any key. Uncomment `transparent-scrolls'
# if you whant this key to be sent to the remote.

#transparent-scrolls

# Load a table for remote-to-local(and local-to-remote) charset translation
# (The table commented out will be created from the other)
# The idea of this tables is:  translated_char = table[original_char];

remote-to-local %etc%\\KOI8-ALT
#local-to-remote D:/MPTN/etc/ALT-KOI8

# Exit telnet/Close current session/Shell to OS/Show statistics/
# Toggle readable escapes/CLS, reset colors/
# Toggle client-server charset translation/Send a command/etc.
#
# key	<scancode>	<command>	<comment1>	<comment2>
#	---------------	---------------	---------------	---------------------

key	\0\x02e		send		alt+c		"Send a special char"
key	\0\x01f		stat		alt+s		"Show statistics"
key	\0\x020		debug		alt+d		"Toggle ANSI debugging"
key	\0\x026		xlat		alt+l		"Toggle remote-to-local charset translation"
key	\0\x013		rANSI		alt+r		"Clear screen, reset ANSI driver"
key	\0\x099		scroll-up	alt+pgup/pgdn	"Scroll up/down console's history"
key	\0\x0a1		scroll-dn
key	\0\x019		paste		alt+p/shift+ins	"Paste from the system clipboard"
key	\0\x018		shell		alt+o		"Run subshell"
key	\0\x010		close		alt+q		"Close current session"
key	\0\x02d		exit		alt+x		"Exit"
#alt-h == help
key	\0\x023		help		""		""

# [Ctrl+]Alt+F1 ... F10 to switch sessions

key	\0\x068		vt1		"alt+F1...F10"	"Switch to the 1st...10th virtual terminal"
key	\0\x069		vt2
key	\0\x06a		vt3
key	\0\x06b		vt4
key	\0\x06c		vt5
key	\0\x06d		vt6
key	\0\x06e		vt7
key	\0\x06f		vt8
key	\0\x070		vt9
key	\0\x071		vt0

# Key mappings.
#
# map <local scancode>	<remote ANSI seq>	[evrthng here'll be ignored]
#      ---------------	-----------------	----------------------------

#map	\E		\E\E			Esc
map	\xd		\xd\xa

map	\0\x03B		\EOP			F1
map	\0\x03C		\EOQ			F2
map	\0\x03D		\EOR			F3
map	\0\x03E		\EOS			F4
map	\0\x03F		\EOT			F5
map	\0\x040		\EOU			F6
map	\0\x041		\EOV			F7
map	\0\x042		\EOW			F8
map	\0\x043		\EOX			F9
map	\0\x044		\EOY			F10
map	\0T		\EOp			F1
map	\0U		\EOq			F2
map	\0V		\EOr			F3
map	\0W		\EOs			F4
map	\0X		\EOt			F5
map	\0Y		\EOu			F6
map	\0Z		\EOv			F7
map	\0[		\EOw			F8
map	\0\\		\EOx			F9
map	\0]		\EOy			F10

map	\x0\x048	\E[A			Up
map	\x0\x050	\E[B			Down 
map	\x0\x04D	\E[C			Right 
map	\x0\x04B	\E[D			Left
map	\x0\x98		\Ea\EOW\EA		Alt+Up 
map	\x0\xa0		\Ea\EOX\EA		Alt+Down
map	\x0\x9D		\Ea\EOY\EA		Alt+Right
map	\x0\x9B		\Ea\EOZ\EA		Alt+Left

map	\x0\x052	\E[@			Ins
map	\x0\x053	\x07F			Del

map	\x0\x049	\E[V			PgUp
map	\x0\x051	\E[U			PgDown
map	\x0\x047	\E[H			Home
map	\x0\x04F	\E[Y			End
