summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pcvt/userkeys/vt220keys.1
blob: 215d2f85bd2a2375f1b292436ff27f39eae1e483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.TH VT220KEYS 1 
.UC 4
.SH NAME
vt220keys \- define SHIFTED function keys on VT220 terminal
.SH SYNTAX
.B vt220keys
[
.B \-cil
]
[ keyname keystring ] ...
.SH DESCRIPTION
.I Vt220keys
sets up a "vt220 terminal" in vt200 mode to allow user
definition of the SHIFTED function keys. Each
\f2keyname\f1 specified on the command line will be loaded with
the corresponding \f2keystring\f1.  
A \f2keyname\f1 is one of the  following "words":
F6 F7 F8 F9 F10 F11 ESC F12 BS F13 LF F14 HELP DO F17 F18 F19 F20.  
\f2Keystrings\f1
must be quoted if spaces, tabs, or shell metacharacters are included. 
.PP
.B Vt220keys
expects to receive some combination of option flags and/or 
argument pair(s), otherwise a usage message
is printed.
.PP
The options are:
.TP
.B \-c 
Clears all SHIFTED function key definitions before setting them to user
defined strings.
.TP
.B \-i
Read the initialization file 
.I $HOME/.vt220rc
for SHIFTED function key definitions.  This is done before any
argument pair specified on the command line is processed.
Each line in the file must consist of two fields (separated by spaces
or tabs) where the first field is the 
\f2keyname\f1 and the second field is the \f2keystring\f1.
The second field extends to the end of the line, thus a
\f2keystring\f1
may include spaces or tabs.  A newline (return) may be specified
within the string by using the C Language notation for newline (\\n).
.TP
.B \-l 
Locks the function keys from further definition.  
Locking occurs after processing the initialization file (if the "i"
option is specified) and any argument
pairs.
The only way
to unlock is by turning the power off.
.SH EXAMPLES
vt220keys -ci
.br
vt220keys F6 'nroff -ms '
.br
vt220keys -i F20 'cc -O -c '
.br
vt220keys -l HELP man
.SH "OTHER FEATURES"
Pressing the function keys without using the shift key, generates
a string of characters.  With
\f2csh\f1(1) this string can be aliased to some command.  For example:
.br
	alias ^[[17~ "ls -CR | more"
.br
where ^[[17~ is what is generated by pressing the F6 key.  Therefore
F6 can perform two commands, depending if pressed with/without the SHIFT
key.
.PP
.B Vt220keys
can be called from your .login or .profile file.  Typically an user
will create a initialization file and include a line like
.br
	vt220keys -ci
.br
OR
.br
	vt220keys -cil
.br
in the above mentioned files.  This way the SHIFTED function keys
will be set to your favorite commands when logging in.
.SH CAVEATS
If the SHIFTED function keys are unlocked, redefinition of a SHIFTED 
function key will rewrite the old string.
.PP
There are 256 bytes available for the SHIFTED function keys.  Space is 
supplied on a first-come/first-serve basis.  After the 256 bytes are
used, you can't define any more keys unless space is cleared.  This
can be done by redefining a key to contain a string of fewer bytes. 
.PP
All key definitions are stored in volatile RAM, and are lost when
terminal power is lost.
.PP
The ESC key (unshifted) no longer generates the proper escape character.  This
is of particular importance since many editors require use  of the
ESC key.  Here are some available alternatives:
.sp
.in +.5i
The escape character can be generated by typing ^[ (control-[).
.sp
Use 
.B vt220keys
as follows (note ^[ is control-[)
.br
.in +.5i
vt220keys ESC '^['  
.in
.br
This will require you
to press the SHIFT key and ESC to generate the escape sequence.
.sp
Some editors, allow other character(s) to be substituted for the 
escape character. For example with 
.B emacs
include this line in your .emacs_pro:
.br
    (bind-to-key "ESC-prefix" "\\033[23~")
.br
Thus when the ESC key is pressed, emacs will allow the characters
generated (^[[23~) to perform the same function as the escape
character.
.in
.SH FILES
$HOME/.vt220rc	\- initialization file
.SH "SEE ALSO"
VT220 Programmer Reference Manual
.br
VT220 Programmer Pocket Guide

OpenPOWER on IntegriCloud