terminfo revision f2e35a3a
1# $XTermId: terminfo,v 1.190 2020/12/11 09:23:14 tom Exp $
2#
3# Updates/notes/new entries (e.g., xterm-8bit, xterm-16color, xterm-256color)
4# - Thomas E. Dickey
5#
6#------------------------------------------------------------------------------
7# Copyright 1996-2019,2020 by Thomas E. Dickey
8#
9#                         All Rights Reserved
10#
11# Permission is hereby granted, free of charge, to any person obtaining a
12# copy of this software and associated documentation files (the
13# "Software"), to deal in the Software without restriction, including
14# without limitation the rights to use, copy, modify, merge, publish,
15# distribute, sublicense, and/or sell copies of the Software, and to
16# permit persons to whom the Software is furnished to do so, subject to
17# the following conditions:
18#
19# The above copyright notice and this permission notice shall be included
20# in all copies or substantial portions of the Software.
21#
22# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25# IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
26# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29#
30# Except as contained in this notice, the name(s) of the above copyright
31# holders shall not be used in advertising or otherwise to promote the
32# sale, use or other dealings in this Software without prior written
33# authorization.
34#------------------------------------------------------------------------------
35# format (ncurses 6.1): tic -I -W -1 -f -x terminfo
36#------------------------------------------------------------------------------
37#
38# Special Capabilities:
39# --------------------
40# ich has a corresponding capability that inserts a single blank.  We could
41#	have used ich1=\E[@, which works with ncurses, but that is not standard
42#	behavior.  If it is set, then SVr4 vi (e.g., Solaris 2.6) emits both
43#	smir/rmir and ich1.
44# meml locks memory above the cursor; memu unlocks (ala HP terminals).  This
45#	is not recognized by some older (e.g., SVr3) tic programs, but none
46#	do more than warn about it.  Ignore the warning.
47# smcup clears memory before switching to the alternate screen.  The older
48#	(deprecated) \E[?47h did not do this, requiring applications to
49#	embed a \E[2J in the rmcup string.  However, that behavior cannot
50#	be disabled via titeInhibit, making that resource not function as
51#	intended on systems with terminfo.
52# rs2/is2 are shorter with XFree86 xterm because it supports DECSTR.  We
53#	use the shorter sequence for compatibility with the termcap, which
54#	is trimmed to keep it shorter than 1023 characters.  It (escape \E[!p)
55#	replaces these in the conventional vt100 reset-string:
56#		\E7	- save cursor (fixes origin-mode side-effect)
57#		\E[r	- reset scrolling margins
58#		\E[m	- reset SGR (including color)
59#		\E[?7h	- reset wraparound mode (DECAWM)
60#		\E[?1l	- reset application cursor keys (DECCKM)
61#		\E[?6l	- reset origin mode (DECOM)
62#		\E8	- restore cursor
63#	DECSTR is recognized by XFree86 xterm even in vt52 mode.
64#
65# Editing Keypad:
66# --------------
67# XFree86 xterm emulates vt220 if the decTerminalID resource is set to 200 or
68# higher.  Otherwise it emulates a vt100 or vt52 depending on the value of the
69# resource.  When emulating a vt220, we support the editing keypad.  Sun and PC
70# keyboards have an editing keypad which is similar to the vt220:
71#
72#	VT220 editing keypad
73#	----------------------------
74#	Find      Insert      Remove
75#	Select    Prev        Next
76#	----------------------------
77#
78#	Sun/PC editing keypad
79#	----------------------------
80#	Insert    Home        PageUp
81#	Delete    End         PageDn
82#	----------------------------
83#
84# If the sunKeyboard resource is true, we map it this way (adjusting the values
85# of Home, End and Delete):
86#	VT220		      Sun/PC
87#	----------------------------
88#	Find		      Home
89#	Select		      End
90#	Insert		      Insert
91#	Remove		      Delete
92#	Prev		      PageUp
93#	Next		      PageDn
94#	----------------------------
95#
96# Note that all of the keys on the editing keypad transmit escape sequences.  A
97# vt220 does this only when in vt220 mode; when emulating a vt100 the editing
98# keypad is inactive.
99#
100# Alternative keycodes:
101# --------------------
102# Several of the function keys have alternative names, depending on the type of
103# host which your xterm is connected to.  DEC (i.e., the VMS system) uses F15
104# as the HELP key, F16 as the DO key.  Unix applications generally do not do
105# this.  Curses applications in particular, assign a unique keycode to each
106# capability string.  These terminal descriptions do not have conflicting
107# definitions, to ensure that Unix curses applications use a consistent set of
108# keycodes.  To get a VMS-bias, make these substitutions:
109#	1. change khome to kfnd
110#	2. change kend to kslt
111# The original xterm-r6 entry does in fact have a VMS bias.
112#
113# Some legacy applications using the termcap emulation may expect kll where
114# we have specified kend.
115#
116# Function keys with modifiers (Sun/PC):
117# -------------------------------------
118#	Shift-Fx          - kf{12+x}
119#	Control-Fx        - kf{24+x}
120#	Shift-Control-Fx  - kf{36+x}
121#
122# The terminfo defines some special keys which are documented as "shifted",
123# e.g., kDC is shifted-delete-character.
124#
125# Note however, that even though the terminfo says a key might be sent, there
126# may be conflicts which prevent this.  For example, it is common to use
127# shifted pageup and pagedown for window manager functions.  The default
128# translation for xterm since X11R4 has overridden shifted Insert, Select,
129# PageUp and PageDown, which correspond to terminfo kIC, kEND, kPRV and kNXT
130# respectively.
131#
132xterm-new|modern xterm terminal emulator,
133	npc,
134	indn=\E[%p1%dS,
135	kcbt=\E[Z,
136	kent=\EOM,
137	rin=\E[%p1%dT,
138	use=xterm+keypad,
139	use=vt420+lrmm,
140	use=xterm+sm+1006,
141	use=ansi+rep,
142	use=ecma+strikeout,
143	use=xterm+pcfkeys,
144	use=xterm+tmux,
145	use=xterm-basic,
146
147# Left/right margins are supported in xterm since patch #279 (2012/05/10)
148vt420+lrmm|VT420 left/right margins,
149	mgc=\E[?69l,
150	smglr=\E[?69h\E[%i%p1%d;%p2%ds,
151
152# These "ansi+XXX" blocks were added in ncurses 5.0:
153ansi+rep,
154	rep=%p1%c\E[%p2%{1}%-%db,
155
156ansi+enq|ncurses extension for ANSI ENQ,
157	u6=\E[%i%d;%dR,
158	u7=\E[6n,
159	u8=\E[?%[;0123456789]c,
160	u9=\E[c,
161
162# Encode modifiers using parameters (see "Xterm Control Sequences" ctlseqs.ms).
163# Note that this is unrelated to PCTERM.
164#
165# Some names are extensions allowed by ncurses, e.g.,
166#	kDN, kDN5, kDN6, kLFT5, kLFT6, kRIT5, kRIT6, kUP, kUP5, kUP6
167#
168# The uppercase names are made up, since there are no standards that apply.
169# If they were limited to two characters, they could in principle be translated
170# to termcap.  However, termcap sizes are limited to 1023 bytes, so there is
171# little point in ensuring that extended key names can be translated to
172# termcap.  A terminfo file can be up to 4096 bytes; using all extended keys
173# that xterm can generate would in fact exceed that limit.
174#
175# The numbers correspond to the modifier parameters documented in Xterm
176# Control Sequences:
177#
178#	2	Shift
179#	3	Alt
180#	4	Shift + Alt
181#	5	Control
182#	6	Shift + Control
183#	7	Alt + Control
184#	8	Shift + Alt + Control
185#
186# X/Open Curses defines some shift combinations, which are also used here
187# where applicable.  Since it does define some shift combinations, no number
188# (2) is used for suffixing the made-up names.  Some combinations are not
189# useful, e.g., they may reboot your computer, or they may require too many
190# fingers.  I stopped at modifier 7, just to keep things simple -TD
191#
192# XTerm resources:
193# ---------------
194# The xterm+pcfn, xterm+pcf0, xterm+pcf1, xterm+pcf2 and xterm+pcf3 fragments
195# correspond to default resource settings for xterm on a 104-key PC keyboard
196# with 12 function-keys:
197#
198#	*sunKeyboard:false
199#	*oldXtermFKeys:false
200#	*modifyCursorKeys:2
201#	*modifyFunctionKeys:2
202#	*ctrlFKeys:10
203#
204# The key numbers are computed based on the modifiers:
205#
206#	kf1-kf12 are F1-F12
207#	kf13-kf24 are shift F1-F12
208#	kf25-kf36 are control F1-F12
209#	kf37-kf48 are control+shift F1-F12
210#	kf49-kf60 are alt F1-F12
211#	kf61-kf63 are shift-alt F1-F3
212#
213# Note that ncurses would allow definition of kf64 and beyond, if there were
214# an application that required it.
215#
216xterm+pcfkeys|fragment for PC-style keys,
217	use=xterm+app,
218	use=xterm+pcf2,
219	use=xterm+pce2,
220	use=xterm+pcc2,
221
222# This chunk is based on suggestions by Ailin Nemui and Nicholas Marriott, who
223# asked for some of xterm's advanced features to be added to its terminfo
224# entry.  It defines extended capabilities not found in standard terminfo or
225# termcap.  These are useful in tmux, for instance, hence the name.
226#
227# One caveat in adding extended capabilities in ncurses is that if the names
228# are longer than two characters, then they will not be visible through the
229# termcap interface.
230#
231# Ms modifies the selection/clipboard.  Its parameters are
232#	p1 = the storage unit (clipboard, selection or cut buffer)
233#	p2 = the base64-encoded clipboard content.
234#
235# Ss is used to set the cursor style as described by the DECSCUSR
236#	function to a block or underline.
237# Se resets the cursor style to the terminal power-on default.
238#
239# Cs and Ce set and reset the cursor colour.
240xterm+tmux|advanced xterm features used in tmux,
241	Cr=\E]112\007,
242	Cs=\E]12;%p1%s\007,
243	Ms=\E]52;%p1%s;%p2%s
244	   \007,
245	Se=\E[2\sq,
246	Ss=\E[%p1%d\sq,
247#
248# The ctrlFKeys resource is only relevant to the xterm+pcfn and xterm+pcfN
249# entries, since the modifyFunctionKeys resource overrides ctrlFKeys when it is
250# positive.  A different choice of ctrlFKeys would give a different set of
251# function-key strings.
252xterm+pcfn|fragment with modifyFunctionKeys:-1 and ctrlFKeys:10,
253	kf1=\EOP,
254	kf10=\E[21~,
255	kf11=\E[23~,
256	kf12=\E[24~,
257	kf13=\E[25~,
258	kf14=\E[26~,
259	kf15=\E[28~,
260	kf16=\E[29~,
261	kf17=\E[31~,
262	kf18=\E[32~,
263	kf19=\E[33~,
264	kf2=\EOQ,
265	kf20=\E[34~,
266	kf21=\E[42~,
267	kf22=\E[43~,
268	kf23=\E[44~,
269	kf24=\E[45~,
270	kf25=\E[46~,
271	kf26=\E[47~,
272	kf27=\E[48~,
273	kf28=\E[49~,
274	kf29=\E[50~,
275	kf3=\EOR,
276	kf30=\E[51~,
277	kf31=\E[52~,
278	kf32=\E[53~,
279	kf33=\E[54~,
280	kf34=\E[55~,
281	kf35=\E[56~,
282	kf36=\E[57~,
283	kf37=\E[58~,
284	kf38=\E[59~,
285	kf39=\E[60~,
286	kf4=\EOS,
287	kf40=\E[61~,
288	kf41=\E[62~,
289	kf42=\E[63~,
290	kf43=\E[64~,
291	kf44=\E[65~,
292	kf45=\E[66~,
293	kf46=\E[67~,
294	kf47=\E[68~,
295	kf48=\E[69~,
296	kf5=\E[15~,
297	kf6=\E[17~,
298	kf7=\E[18~,
299	kf8=\E[19~,
300	kf9=\E[20~,
301
302# Changing ctrlFKeys to 12 would let us number the keys using just shift- and
303# control- modifiers:
304#	kf1-kf12 are F1-F12
305#	kf13-kf24 are shift F1-F12
306#	kf25-kf36 are control F1-F12
307#	kf37-kf48 are control+shift F1-F12
308xterm+pcfN|fragment with modifyFunctionKeys:-1 and ctrlFKeys:12,
309	kf1=\EOP,
310	kf10=\E[21~,
311	kf11=\E[23~,
312	kf12=\E[24~,
313	kf13=\E[25~,
314	kf14=\E[26~,
315	kf15=\E[28~,
316	kf16=\E[29~,
317	kf17=\E[31~,
318	kf18=\E[32~,
319	kf19=\E[33~,
320	kf2=\EOQ,
321	kf20=\E[34~,
322	kf21=\E[42~,
323	kf22=\E[43~,
324	kf23=\E[44~,
325	kf24=\E[45~,
326	kf25=\E[46~,
327	kf26=\E[47~,
328	kf27=\E[48~,
329	kf28=\E[49~,
330	kf29=\E[50~,
331	kf3=\EOR,
332	kf30=\E[51~,
333	kf31=\E[52~,
334	kf32=\E[53~,
335	kf33=\E[54~,
336	kf34=\E[55~,
337	kf35=\E[56~,
338	kf36=\E[57~,
339	kf37=\E[58~,
340	kf38=\E[59~,
341	kf39=\E[60~,
342	kf4=\EOS,
343	kf40=\E[61~,
344	kf41=\E[62~,
345	kf42=\E[63~,
346	kf43=\E[64~,
347	kf44=\E[65~,
348	kf45=\E[66~,
349	kf46=\E[67~,
350	kf47=\E[68~,
351	kf48=\E[69~,
352	kf5=\E[15~,
353	kf6=\E[17~,
354	kf7=\E[18~,
355	kf8=\E[19~,
356	kf9=\E[20~,
357
358xterm+pcf0|fragment with modifyFunctionKeys:0,
359	kf1=\EOP,
360	kf10=\E[21~,
361	kf11=\E[23~,
362	kf12=\E[24~,
363	kf13=\EO2P,
364	kf14=\EO2Q,
365	kf15=\EO2R,
366	kf16=\EO2S,
367	kf17=\E[15;2~,
368	kf18=\E[17;2~,
369	kf19=\E[18;2~,
370	kf2=\EOQ,
371	kf20=\E[19;2~,
372	kf21=\E[20;2~,
373	kf22=\E[21;2~,
374	kf23=\E[23;2~,
375	kf24=\E[24;2~,
376	kf25=\EO5P,
377	kf26=\EO5Q,
378	kf27=\EO5R,
379	kf28=\EO5S,
380	kf29=\E[15;5~,
381	kf3=\EOR,
382	kf30=\E[17;5~,
383	kf31=\E[18;5~,
384	kf32=\E[19;5~,
385	kf33=\E[20;5~,
386	kf34=\E[21;5~,
387	kf35=\E[23;5~,
388	kf36=\E[24;5~,
389	kf37=\EO6P,
390	kf38=\EO6Q,
391	kf39=\EO6R,
392	kf4=\EOS,
393	kf40=\EO6S,
394	kf41=\E[15;6~,
395	kf42=\E[17;6~,
396	kf43=\E[18;6~,
397	kf44=\E[19;6~,
398	kf45=\E[20;6~,
399	kf46=\E[21;6~,
400	kf47=\E[23;6~,
401	kf48=\E[24;6~,
402	kf49=\EO3P,
403	kf5=\E[15~,
404	kf50=\EO3Q,
405	kf51=\EO3R,
406	kf52=\EO3S,
407	kf53=\E[15;3~,
408	kf54=\E[17;3~,
409	kf55=\E[18;3~,
410	kf56=\E[19;3~,
411	kf57=\E[20;3~,
412	kf58=\E[21;3~,
413	kf59=\E[23;3~,
414	kf6=\E[17~,
415	kf60=\E[24;3~,
416	kf61=\EO4P,
417	kf62=\EO4Q,
418	kf63=\EO4R,
419	kf7=\E[18~,
420	kf8=\E[19~,
421	kf9=\E[20~,
422
423# This is almost the same as xterm+pcf2 because the unmodified keys all happen
424# to have a pattern that forces the modifier to the same position.
425xterm+pcf1|fragment with modifyFunctionKeys:1,
426	kf1=\EOP,
427	kf10=\E[21~,
428	kf11=\E[23~,
429	kf12=\E[24~,
430	kf13=\E[2P,
431	kf14=\E[2Q,
432	kf15=\E[2R,
433	kf16=\E[2S,
434	kf17=\E[15;2~,
435	kf18=\E[17;2~,
436	kf19=\E[18;2~,
437	kf2=\EOQ,
438	kf20=\E[19;2~,
439	kf21=\E[20;2~,
440	kf22=\E[21;2~,
441	kf23=\E[23;2~,
442	kf24=\E[24;2~,
443	kf25=\E[5P,
444	kf26=\E[5Q,
445	kf27=\E[5R,
446	kf28=\E[5S,
447	kf29=\E[15;5~,
448	kf3=\EOR,
449	kf30=\E[17;5~,
450	kf31=\E[18;5~,
451	kf32=\E[19;5~,
452	kf33=\E[20;5~,
453	kf34=\E[21;5~,
454	kf35=\E[23;5~,
455	kf36=\E[24;5~,
456	kf37=\E[6P,
457	kf38=\E[6Q,
458	kf39=\E[6R,
459	kf4=\EOS,
460	kf40=\E[6S,
461	kf41=\E[15;6~,
462	kf42=\E[17;6~,
463	kf43=\E[18;6~,
464	kf44=\E[19;6~,
465	kf45=\E[20;6~,
466	kf46=\E[21;6~,
467	kf47=\E[23;6~,
468	kf48=\E[24;6~,
469	kf49=\E[3P,
470	kf5=\E[15~,
471	kf50=\E[3Q,
472	kf51=\E[3R,
473	kf52=\E[3S,
474	kf53=\E[15;3~,
475	kf54=\E[17;3~,
476	kf55=\E[18;3~,
477	kf56=\E[19;3~,
478	kf57=\E[20;3~,
479	kf58=\E[21;3~,
480	kf59=\E[23;3~,
481	kf6=\E[17~,
482	kf60=\E[24;3~,
483	kf61=\E[4P,
484	kf62=\E[4Q,
485	kf63=\E[4R,
486	kf7=\E[18~,
487	kf8=\E[19~,
488	kf9=\E[20~,
489
490xterm+pcf2|fragment with modifyFunctionKeys:2,
491	kf1=\EOP,
492	kf10=\E[21~,
493	kf11=\E[23~,
494	kf12=\E[24~,
495	kf13=\E[1;2P,
496	kf14=\E[1;2Q,
497	kf15=\E[1;2R,
498	kf16=\E[1;2S,
499	kf17=\E[15;2~,
500	kf18=\E[17;2~,
501	kf19=\E[18;2~,
502	kf2=\EOQ,
503	kf20=\E[19;2~,
504	kf21=\E[20;2~,
505	kf22=\E[21;2~,
506	kf23=\E[23;2~,
507	kf24=\E[24;2~,
508	kf25=\E[1;5P,
509	kf26=\E[1;5Q,
510	kf27=\E[1;5R,
511	kf28=\E[1;5S,
512	kf29=\E[15;5~,
513	kf3=\EOR,
514	kf30=\E[17;5~,
515	kf31=\E[18;5~,
516	kf32=\E[19;5~,
517	kf33=\E[20;5~,
518	kf34=\E[21;5~,
519	kf35=\E[23;5~,
520	kf36=\E[24;5~,
521	kf37=\E[1;6P,
522	kf38=\E[1;6Q,
523	kf39=\E[1;6R,
524	kf4=\EOS,
525	kf40=\E[1;6S,
526	kf41=\E[15;6~,
527	kf42=\E[17;6~,
528	kf43=\E[18;6~,
529	kf44=\E[19;6~,
530	kf45=\E[20;6~,
531	kf46=\E[21;6~,
532	kf47=\E[23;6~,
533	kf48=\E[24;6~,
534	kf49=\E[1;3P,
535	kf5=\E[15~,
536	kf50=\E[1;3Q,
537	kf51=\E[1;3R,
538	kf52=\E[1;3S,
539	kf53=\E[15;3~,
540	kf54=\E[17;3~,
541	kf55=\E[18;3~,
542	kf56=\E[19;3~,
543	kf57=\E[20;3~,
544	kf58=\E[21;3~,
545	kf59=\E[23;3~,
546	kf6=\E[17~,
547	kf60=\E[24;3~,
548	kf61=\E[1;4P,
549	kf62=\E[1;4Q,
550	kf63=\E[1;4R,
551	kf7=\E[18~,
552	kf8=\E[19~,
553	kf9=\E[20~,
554
555xterm+pcf3|fragment with modifyFunctionKeys:3,
556	kf1=\EOP,
557	kf10=\E[21~,
558	kf11=\E[23~,
559	kf12=\E[24~,
560	kf13=\E[>1;2P,
561	kf14=\E[>1;2Q,
562	kf15=\E[>1;2R,
563	kf16=\E[>1;2S,
564	kf17=\E[>15;2~,
565	kf18=\E[>17;2~,
566	kf19=\E[>18;2~,
567	kf2=\EOQ,
568	kf20=\E[>19;2~,
569	kf21=\E[>20;2~,
570	kf22=\E[>21;2~,
571	kf23=\E[>23;2~,
572	kf24=\E[>24;2~,
573	kf25=\E[>1;5P,
574	kf26=\E[>1;5Q,
575	kf27=\E[>1;5R,
576	kf28=\E[>1;5S,
577	kf29=\E[>15;5~,
578	kf3=\EOR,
579	kf30=\E[>17;5~,
580	kf31=\E[>18;5~,
581	kf32=\E[>19;5~,
582	kf33=\E[>20;5~,
583	kf34=\E[>21;5~,
584	kf35=\E[>23;5~,
585	kf36=\E[>24;5~,
586	kf37=\E[>1;6P,
587	kf38=\E[>1;6Q,
588	kf39=\E[>1;6R,
589	kf4=\EOS,
590	kf40=\E[>1;6S,
591	kf41=\E[>15;6~,
592	kf42=\E[>17;6~,
593	kf43=\E[>18;6~,
594	kf44=\E[>19;6~,
595	kf45=\E[>20;6~,
596	kf46=\E[>21;6~,
597	kf47=\E[>23;6~,
598	kf48=\E[>24;6~,
599	kf49=\E[>1;3P,
600	kf5=\E[15~,
601	kf50=\E[>1;3Q,
602	kf51=\E[>1;3R,
603	kf52=\E[>1;3S,
604	kf53=\E[>15;3~,
605	kf54=\E[>17;3~,
606	kf55=\E[>18;3~,
607	kf56=\E[>19;3~,
608	kf57=\E[>20;3~,
609	kf58=\E[>21;3~,
610	kf59=\E[>23;3~,
611	kf6=\E[17~,
612	kf60=\E[>24;3~,
613	kf61=\E[>1;4P,
614	kf62=\E[>1;4Q,
615	kf63=\E[>1;4R,
616	kf7=\E[18~,
617	kf8=\E[19~,
618	kf9=\E[20~,
619#
620# The "PC-style" modifier scheme was introduced in xterm patch #94 (1999/3/27)
621# and revised in patch #167 (2002/8/24).
622#
623# The original assignments from patch #94 for cursor-keys had some technical
624# issues:
625#
626#	A parameter for a function-key to represent a modifier is just more
627#	bits.  But for a cursor-key it may change the behavior of the
628#	application.  For instance, emacs decodes the first parameter of a
629#	cursor-key as a repeat count.
630#
631#	A parameterized string should (really) not begin with SS3 (\EO).
632#	Rather, CSI (\E[) should be used.
633#
634# For these reasons, the original assignments were deprecated.  For
635# compatibility reasons, they are still available as a setting of xterm's
636# modifyCursorKeys resource.  These fragments list the modified cursor-keys
637# that might apply to xterm+pcfkeys with different values of that resource.
638xterm+pcc3|fragment with modifyCursorKeys:3,
639	kLFT=\E[>1;2D,
640	kRIT=\E[>1;2C,
641	kind=\E[>1;2B,
642	kri=\E[>1;2A,
643	kDN=\E[>1;2B,
644	kDN3=\E[>1;3B,
645	kDN4=\E[>1;4B,
646	kDN5=\E[>1;5B,
647	kDN6=\E[>1;6B,
648	kDN7=\E[>1;7B,
649	kLFT3=\E[>1;3D,
650	kLFT4=\E[>1;4D,
651	kLFT5=\E[>1;5D,
652	kLFT6=\E[>1;6D,
653	kLFT7=\E[>1;7D,
654	kRIT3=\E[>1;3C,
655	kRIT4=\E[>1;4C,
656	kRIT5=\E[>1;5C,
657	kRIT6=\E[>1;6C,
658	kRIT7=\E[>1;7C,
659	kUP=\E[>1;2A,
660	kUP3=\E[>1;3A,
661	kUP4=\E[>1;4A,
662	kUP5=\E[>1;5A,
663	kUP6=\E[>1;6A,
664	kUP7=\E[>1;7A,
665
666xterm+pcc2|fragment with modifyCursorKeys:2,
667	kLFT=\E[1;2D,
668	kRIT=\E[1;2C,
669	kind=\E[1;2B,
670	kri=\E[1;2A,
671	kDN=\E[1;2B,
672	kDN3=\E[1;3B,
673	kDN4=\E[1;4B,
674	kDN5=\E[1;5B,
675	kDN6=\E[1;6B,
676	kDN7=\E[1;7B,
677	kLFT3=\E[1;3D,
678	kLFT4=\E[1;4D,
679	kLFT5=\E[1;5D,
680	kLFT6=\E[1;6D,
681	kLFT7=\E[1;7D,
682	kRIT3=\E[1;3C,
683	kRIT4=\E[1;4C,
684	kRIT5=\E[1;5C,
685	kRIT6=\E[1;6C,
686	kRIT7=\E[1;7C,
687	kUP=\E[1;2A,
688	kUP3=\E[1;3A,
689	kUP4=\E[1;4A,
690	kUP5=\E[1;5A,
691	kUP6=\E[1;6A,
692	kUP7=\E[1;7A,
693
694xterm+pcc1|fragment with modifyCursorKeys:1,
695	kLFT=\E[2D,
696	kRIT=\E[2C,
697	kind=\E[2B,
698	kri=\E[2A,
699	kDN=\E[2B,
700	kDN3=\E[3B,
701	kDN4=\E[4B,
702	kDN5=\E[5B,
703	kDN6=\E[6B,
704	kDN7=\E[7B,
705	kLFT3=\E[3D,
706	kLFT4=\E[4D,
707	kLFT5=\E[5D,
708	kLFT6=\E[6D,
709	kLFT7=\E[7D,
710	kRIT3=\E[3C,
711	kRIT4=\E[4C,
712	kRIT5=\E[5C,
713	kRIT6=\E[6C,
714	kRIT7=\E[7C,
715	kUP=\E[2A,
716	kUP3=\E[3A,
717	kUP4=\E[4A,
718	kUP5=\E[5A,
719	kUP6=\E[6A,
720	kUP7=\E[7A,
721
722xterm+pcc0|fragment with modifyCursorKeys:0,
723	kLFT=\EO2D,
724	kRIT=\EO2C,
725	kind=\EO2B,
726	kri=\EO2A,
727	kDN=\EO2B,
728	kDN3=\EO3B,
729	kDN4=\EO4B,
730	kDN5=\EO5B,
731	kDN6=\EO6B,
732	kDN7=\EO7B,
733	kLFT3=\EO3D,
734	kLFT4=\EO4D,
735	kLFT5=\EO5D,
736	kLFT6=\EO6D,
737	kLFT7=\EO7D,
738	kRIT3=\EO3C,
739	kRIT4=\EO4C,
740	kRIT5=\EO5C,
741	kRIT6=\EO6C,
742	kRIT7=\EO7C,
743	kUP=\EO2A,
744	kUP3=\EO3A,
745	kUP4=\EO4A,
746	kUP5=\EO5A,
747	kUP6=\EO6A,
748	kUP7=\EO7A,
749
750# The home/end keys on the editing keypad are also treated as cursor keys.
751xterm+pce3|fragment with modifyCursorKeys:3,
752	kDC=\E[>3;2~,
753	kEND=\E[>1;2F,
754	kHOM=\E[>1;2H,
755	kIC=\E[>2;2~,
756	kNXT=\E[>6;2~,
757	kPRV=\E[>5;2~,
758	kDC3=\E[>3;3~,
759	kDC4=\E[>3;4~,
760	kDC5=\E[>3;5~,
761	kDC6=\E[>3;6~,
762	kDC7=\E[>3;7~,
763	kEND3=\E[>1;3F,
764	kEND4=\E[>1;4F,
765	kEND5=\E[>1;5F,
766	kEND6=\E[>1;6F,
767	kEND7=\E[>1;7F,
768	kHOM3=\E[>1;3H,
769	kHOM4=\E[>1;4H,
770	kHOM5=\E[>1;5H,
771	kHOM6=\E[>1;6H,
772	kHOM7=\E[>1;7H,
773	kIC3=\E[>2;3~,
774	kIC4=\E[>2;4~,
775	kIC5=\E[>2;5~,
776	kIC6=\E[>2;6~,
777	kIC7=\E[>2;7~,
778	kNXT3=\E[>6;3~,
779	kNXT4=\E[>6;4~,
780	kNXT5=\E[>6;5~,
781	kNXT6=\E[>6;6~,
782	kNXT7=\E[>6;7~,
783	kPRV3=\E[>5;3~,
784	kPRV4=\E[>5;4~,
785	kPRV5=\E[>5;5~,
786	kPRV6=\E[>5;6~,
787	kPRV7=\E[>5;7~,
788	use=xterm+pce0,
789
790xterm+pce2|fragment with modifyCursorKeys:2,
791	kDC=\E[3;2~,
792	kEND=\E[1;2F,
793	kHOM=\E[1;2H,
794	kIC=\E[2;2~,
795	kNXT=\E[6;2~,
796	kPRV=\E[5;2~,
797	kDC3=\E[3;3~,
798	kDC4=\E[3;4~,
799	kDC5=\E[3;5~,
800	kDC6=\E[3;6~,
801	kDC7=\E[3;7~,
802	kEND3=\E[1;3F,
803	kEND4=\E[1;4F,
804	kEND5=\E[1;5F,
805	kEND6=\E[1;6F,
806	kEND7=\E[1;7F,
807	kHOM3=\E[1;3H,
808	kHOM4=\E[1;4H,
809	kHOM5=\E[1;5H,
810	kHOM6=\E[1;6H,
811	kHOM7=\E[1;7H,
812	kIC3=\E[2;3~,
813	kIC4=\E[2;4~,
814	kIC5=\E[2;5~,
815	kIC6=\E[2;6~,
816	kIC7=\E[2;7~,
817	kNXT3=\E[6;3~,
818	kNXT4=\E[6;4~,
819	kNXT5=\E[6;5~,
820	kNXT6=\E[6;6~,
821	kNXT7=\E[6;7~,
822	kPRV3=\E[5;3~,
823	kPRV4=\E[5;4~,
824	kPRV5=\E[5;5~,
825	kPRV6=\E[5;6~,
826	kPRV7=\E[5;7~,
827	use=xterm+pce0,
828
829xterm+pce1|fragment with modifyCursorKeys:1,
830	kDC=\E[3;2~,
831	kEND=\E[2F,
832	kHOM=\E[2H,
833	kIC=\E[2;2~,
834	kNXT=\E[6;2~,
835	kPRV=\E[5;2~,
836	kDC3=\E[3;3~,
837	kDC4=\E[3;4~,
838	kDC5=\E[3;5~,
839	kDC6=\E[3;6~,
840	kDC7=\E[3;7~,
841	kEND3=\E[3F,
842	kEND4=\E[4F,
843	kEND5=\E[5F,
844	kEND6=\E[6F,
845	kEND7=\E[7F,
846	kHOM3=\E[3H,
847	kHOM4=\E[4H,
848	kHOM5=\E[5H,
849	kHOM6=\E[6H,
850	kHOM7=\E[7H,
851	kIC3=\E[2;3~,
852	kIC4=\E[2;4~,
853	kIC5=\E[2;5~,
854	kIC6=\E[2;6~,
855	kIC7=\E[2;7~,
856	kNXT3=\E[6;3~,
857	kNXT4=\E[6;4~,
858	kNXT5=\E[6;5~,
859	kNXT6=\E[6;6~,
860	kNXT7=\E[6;7~,
861	kPRV3=\E[5;3~,
862	kPRV4=\E[5;4~,
863	kPRV5=\E[5;5~,
864	kPRV6=\E[5;6~,
865	kPRV7=\E[5;7~,
866	use=xterm+pce0,
867
868xterm+pce0|fragment with modifyCursorKeys:0,
869	kDC=\E[3;2~,
870	kEND=\EO2F,
871	kHOM=\EO2H,
872	kIC=\E[2;2~,
873	kNXT=\E[6;2~,
874	kPRV=\E[5;2~,
875	kDC3=\E[3;3~,
876	kDC4=\E[3;4~,
877	kDC5=\E[3;5~,
878	kDC6=\E[3;6~,
879	kDC7=\E[3;7~,
880	kEND3=\EO3F,
881	kEND4=\EO4F,
882	kEND5=\EO5F,
883	kEND6=\EO6F,
884	kEND7=\EO7F,
885	kHOM3=\EO3H,
886	kHOM4=\EO4H,
887	kHOM5=\EO5H,
888	kHOM6=\EO6H,
889	kHOM7=\EO7H,
890	kIC3=\E[2;3~,
891	kIC4=\E[2;4~,
892	kIC5=\E[2;5~,
893	kIC6=\E[2;6~,
894	kIC7=\E[2;7~,
895	kNXT3=\E[6;3~,
896	kNXT4=\E[6;4~,
897	kNXT5=\E[6;5~,
898	kNXT6=\E[6;6~,
899	kNXT7=\E[6;7~,
900	kPRV3=\E[5;3~,
901	kPRV4=\E[5;4~,
902	kPRV5=\E[5;5~,
903	kPRV6=\E[5;6~,
904	kPRV7=\E[5;7~,
905	use=xterm+edit,
906
907# The rmxx/smxx capabilities are an ncurses extension
908ecma+strikeout|ECMA-48 strikeout/crossed-out,
909	rmxx=\E[29m,
910	smxx=\E[9m,
911
912# The XM capability is an ncurses extension
913xterm+sm+1006|xterm SGR-mouse,
914	kmous=\E[<,
915	XM=\E[?1006;1000
916		%?
917			%p1%{1}%=
918			%th
919		%e
920			l
921		%;,
922	xm=\E[<%i
923		%p3%d;%p1%d;%p2%d;
924		%?
925			%p4
926			%tM
927		%e
928			m
929		%;,
930
931# By default, ncurses knows that xterm private mode 1000 enables/disables
932# the X11 xterm mouse protocol.  So XM is not needed here, except for clarity.
933xterm+x11mouse|X11 xterm mouse protocol,
934	kmous=\E[M,
935	XM=\E[?1000
936		%?
937			%p1%{1}%=
938			%th
939		%e
940			l
941		%;,
942	xm=\E[M
943		%?
944			%p4
945			%t%p3
946		%e%{3}
947		%;
948		%'\s'%+%c
949		%p2%'!'%+%c%p1%'!'%+%c,
950
951# This chunk is used for building the VT220/Sun/PC keyboard variants.
952xterm-basic|modern xterm terminal emulator - common,
953	OTbs,
954	am,
955	bce,
956	km,
957	mc5i,
958	mir,
959	msgr,
960	xenl,
961	AX,
962	XT,
963	colors#8,
964	cols#80,
965	it#8,
966	lines#24,
967	pairs#64,
968	acsc=``aaffggiijjkkllmmnnooppqqr
969	     rssttuuvvwwxxyyzz{{||}}~~,
970	bel=^G,
971	blink=\E[5m,
972	bold=\E[1m,
973	cbt=\E[Z,
974	civis=\E[?25l,
975	clear=\E[H\E[2J,
976	cnorm=\E[?12l\E[?25h,
977	cr=\r,
978	csr=\E[%i%p1%d;%p2%dr,
979	cub=\E[%p1%dD,
980	cub1=^H,
981	cud=\E[%p1%dB,
982	cud1=\n,
983	cuf=\E[%p1%dC,
984	cuf1=\E[C,
985	cup=\E[%i%p1%d;%p2%dH,
986	cuu=\E[%p1%dA,
987	cuu1=\E[A,
988	cvvis=\E[?12;25h,
989	dch=\E[%p1%dP,
990	dch1=\E[P,
991	dim=\E[2m,
992	dl=\E[%p1%dM,
993	dl1=\E[M,
994	ech=\E[%p1%dX,
995	ed=\E[J,
996	el=\E[K,
997	el1=\E[1K,
998	flash=\E[?5h$<100/>\E[?5l,
999	home=\E[H,
1000	hpa=\E[%i%p1%dG,
1001	ht=^I,
1002	hts=\EH,
1003	ich=\E[%p1%d@,
1004	il=\E[%p1%dL,
1005	il1=\E[L,
1006	ind=\n,
1007	invis=\E[8m,
1008	is2=\E[!p\E[?3;4l\E[4l\E>,
1009	kmous=\E[M,
1010	mc0=\E[i,
1011	mc4=\E[4i,
1012	mc5=\E[5i,
1013	meml=\El,
1014	memu=\Em,
1015	nel=\EE,
1016	op=\E[39;49m,
1017	rc=\E8,
1018	rev=\E[7m,
1019	ri=\EM,
1020	ritm=\E[23m,
1021	rmacs=\E(B,
1022	rmam=\E[?7l,
1023	rmir=\E[4l,
1024	rmkx=\E[?1l\E>,
1025	rmm=\E[?1034l,
1026	rmso=\E[27m,
1027	rmul=\E[24m,
1028	rs1=\Ec,
1029	rs2=\E[!p\E[?3;4l\E[4l\E>,
1030	sc=\E7,
1031	setab=\E[4%p1%dm,
1032	setaf=\E[3%p1%dm,
1033	setb=\E[4
1034		%?
1035			%p1%{1}%=
1036			%t4
1037		%e
1038			%p1%{3}%=
1039			%t6
1040		%e
1041			%p1%{4}%=
1042			%t1
1043		%e
1044			%p1%{6}%=
1045			%t3
1046		%e
1047			%p1%d
1048		%;
1049		m,
1050	setf=\E[3
1051		%?
1052			%p1%{1}%=
1053			%t4
1054		%e
1055			%p1%{3}%=
1056			%t6
1057		%e
1058			%p1%{4}%=
1059			%t1
1060		%e
1061			%p1%{6}%=
1062			%t3
1063		%e
1064			%p1%d
1065		%;
1066		m,
1067	sgr=
1068		%?
1069			%p9
1070			%t\E(0
1071		%e
1072			\E(B
1073		%;
1074		\E[0
1075		%?
1076			%p6
1077			%t;1
1078		%;
1079		%?
1080			%p5
1081			%t;2
1082		%;
1083		%?
1084			%p2
1085			%t;4
1086		%;
1087		%?
1088			%p1%p3%|
1089			%t;7
1090		%;
1091		%?
1092			%p4
1093			%t;5
1094		%;
1095		%?
1096			%p7
1097			%t;8
1098		%;
1099		m,
1100	sgr0=\E(B\E[m,
1101	sitm=\E[3m,
1102	smacs=\E(0,
1103	smam=\E[?7h,
1104	smir=\E[4h,
1105	smkx=\E[?1h\E=,
1106	smm=\E[?1034h,
1107	smso=\E[7m,
1108	smul=\E[4m,
1109	tbc=\E[3g,
1110	vpa=\E[%i%p1%dd,
1111	E3=\E[3J,
1112	use=ansi+enq,
1113	use=xterm+alt+title,
1114	use=xterm+kbs,
1115#
1116# The xterm-new description has all of the features, but is not completely
1117# compatible with vt220.  If you are using a Sun or PC keyboard, set the
1118# sunKeyboard resource to true:
1119#	+ maps the editing keypad
1120#	+ interprets control-function-key as a second array of keys, so a
1121#	  12-fkey keyboard can support vt220's 20-fkeys.
1122#	+ maps numeric keypad "+" to ",".
1123#	+ uses DEC-style control sequences for the application keypad.
1124#
1125# Some packagers modify xterm's resource definitions to provide extra function
1126# keys by using the shift-modifier in the translations resource.  However, that
1127# interferes with the DECUDK functionality.
1128#
1129xterm-vt220|xterm emulating vt220,
1130	ka1=\EOw,
1131	ka3=\EOy,
1132	kb2=\EOu,
1133	kc1=\EOq,
1134	kc3=\EOs,
1135	kcbt=\E[Z,
1136	kend=\E[4~,
1137	kent=\EOM,
1138	kf1=\EOP,
1139	kf10=\E[21~,
1140	kf11=\E[23~,
1141	kf12=\E[24~,
1142	kf13=\E[25~,
1143	kf14=\E[26~,
1144	kf15=\E[28~,
1145	kf16=\E[29~,
1146	kf17=\E[31~,
1147	kf18=\E[32~,
1148	kf19=\E[33~,
1149	kf2=\EOQ,
1150	kf20=\E[34~,
1151	kf3=\EOR,
1152	kf4=\EOS,
1153	kf5=\E[15~,
1154	kf6=\E[17~,
1155	kf7=\E[18~,
1156	kf8=\E[19~,
1157	kf9=\E[20~,
1158	khome=\E[1~,
1159	kich1=\E[2~,
1160	knp=\E[6~,
1161	kpp=\E[5~,
1162	ka2=\EOx,
1163	kb1=\EOt,
1164	kb3=\EOv,
1165	kc2=\EOr,
1166	use=xterm+app,
1167	use=xterm+edit,
1168	use=xterm-basic,
1169#
1170xterm-vt52|xterm emulating dec vt52,
1171	cols#80,
1172	it#8,
1173	lines#24,
1174	acsc=``aaffggjjkkllmmnnooppqqrrs
1175	     sttuuvvwwxxyyzz{{||}}~~,
1176	bel=^G,
1177	clear=\EH\EJ,
1178	cr=\r,
1179	cub1=\ED,
1180	cud1=\EB,
1181	cuf1=\EC,
1182	cup=\EY%p1%'\s'%+%c%p2%'\s'%+%c,
1183	cuu1=\EA,
1184	ed=\EJ,
1185	el=\EK,
1186	home=\EH,
1187	ht=^I,
1188	ind=\n,
1189	kcub1=\ED,
1190	kcud1=\EB,
1191	kcuf1=\EC,
1192	kcuu1=\EA,
1193	nel=\r\n,
1194	ri=\EI,
1195	rmacs=\EG,
1196	smacs=\EF,
1197	use=xterm+kbs,
1198	use=vt52+keypad,
1199
1200# from ncurses 6.2:
1201# DECScope of course had no "function keys", but this building block assigns
1202# the three blank keys at the top of the auxiliary (numeric) keypad, using
1203# the same analogy as vt100 (also lacking function-keys).
1204#
1205# These assignments use the same layout for 0-9 as vt100+keypad; the vt52
1206# keypad had its cursor-keys on the right-column as shown -TD
1207#   _______________________________________
1208#  |   PF1   |   PF2   |   PF3   | c-up    |
1209#  |   \EP   |   \EQ   |   \ER   |   \EA   |
1210#  |_kf1__k1_|_kf2__k2_|_kf3__k3_|kcuu1_k4_|
1211#  |    7         8         9      c-down  |
1212#  |   \E?w  |   \E?x  |   \E?y  |   \EB   |
1213#  |_kf9__k9_|_kf10_k;_|_kf0__k0_|kcud1____|
1214#  |    4    |    5    |    6    | c-right |
1215#  |   \E?t  |   \E?u  |   \E?v  |   \EC   |
1216#  |_kf5__k5_|_kf6__k6_|_kf7__k7_|kcuf1_k8_|
1217#  |    1    |    2    |    3    | c-left  |
1218#  |   \E?q  |   \E?r  |   \E?s  |   \ED   |
1219#  |_ka1__K1_|_kb2__K2_|_ka3__K3_|kcub1____|
1220#  |         0         |   .     |  enter  |
1221#  |        \E?p       |  \E?n   |  \E?M   |
1222#  |___kc1_______K4____|_kc3__K5_|_kent_@8_|
1223#
1224vt52+keypad|DECScope auxiliary keypad,
1225	ka1=\E?q,
1226	ka3=\E?s,
1227	kb2=\E?r,
1228	kc1=\E?p,
1229	kc3=\E?n,
1230	kf0=\E?y,
1231	kf1=\EP,
1232	kf2=\EQ,
1233	kf3=\ER,
1234	kf5=\E?t,
1235	kf6=\E?u,
1236	kf7=\E?v,
1237	kf8=\E?w,
1238	kf9=\E?x,
1239#
1240# Sun does not number the function keys this way in their sparse termcap; their
1241# terminal descriptions ignore the keypads.  kb(7M) states that there are codes
1242# reserved for 64 function keys, 16 each in left, right, top and bottom.  Each
1243# keyboard type has a different number of function keys in different
1244# arrangements.  Using xkeycaps for reference:
1245#
1246# Type 3:  left 10, top 9, right 15
1247# ------
1248# kf1-kf9 are XK_F1-XK_F9
1249# There is no kf10 on this keyboard type.
1250# kf11-kf20 are keysyms XK_L1 through XK_L10.
1251# kf31-kf45 are keysyms XK_R1 through XK_R15.
1252#
1253# However, X's keysymdef.h is hard-coded to make
1254#	XK_L1==XK_F11 and
1255#	XK_R1==XK_F21,
1256# by someone who was unfamiliar with terminal types other than Sun's.  So
1257# xterm uses the internal X keysymbols, but the terminfo entry uses the Sun
1258# numbering scheme.
1259#
1260# Type 4:  left 11, top 12, right 15
1261# ------
1262# The left-keypad contains an unnumbered Help-key.
1263# The right-keypad also contains NumLock, Ins, Del, Enter, + and - keys which
1264# do not appear to be part of the R-sequence.
1265#
1266# Type 5:  left 9, top 12, right (more than one keypad)
1267# ------
1268# These keyboards do not use the same naming convention, look like a hybrid of
1269# the type 4 and IBM keyboards.
1270#
1271# XTerm resources:
1272# ---------------
1273# Set the modifyFunctionKeys resource to negative (-1) to make it simple to
1274# enter the higher function-key values using shift- and control-modifiers.
1275#
1276xterm-sun|xterm with sun function keys,
1277	kb2=\E[218z,
1278	kcpy=\E[197z,
1279	kcub1=\EOD,
1280	kcud1=\EOB,
1281	kcuf1=\EOC,
1282	kcuu1=\EOA,
1283	kdch1=\E[3z,
1284	kend=\E[220z,
1285	kent=\EOM,
1286	kf1=\E[224z,
1287	kf10=\E[233z,
1288	kf11=\E[192z,
1289	kf12=\E[193z,
1290	kf13=\E[194z,
1291	kf14=\E[195z,
1292	kf15=\E[196z,
1293	kf17=\E[198z,
1294	kf18=\E[199z,
1295	kf19=\E[200z,
1296	kf2=\E[225z,
1297	kf20=\E[201z,
1298	kf3=\E[226z,
1299	kf31=\E[208z,
1300	kf32=\E[209z,
1301	kf33=\E[210z,
1302	kf34=\E[211z,
1303	kf35=\E[212z,
1304	kf36=\E[213z,
1305	kf38=\E[215z,
1306	kf4=\E[227z,
1307	kf40=\E[217z,
1308	kf42=\E[219z,
1309	kf44=\E[221z,
1310	kf45=\E[222z,
1311	kf46=\E[234z,
1312	kf47=\E[235z,
1313	kf5=\E[228z,
1314	kf6=\E[229z,
1315	kf7=\E[230z,
1316	kf8=\E[231z,
1317	kf9=\E[232z,
1318	kfnd=\E[200z,
1319	khlp=\E[196z,
1320	khome=\E[214z,
1321	kich1=\E[2z,
1322	knp=\E[222z,
1323	kpp=\E[216z,
1324	kund=\E[195z,
1325	use=xterm-basic,
1326#
1327xterm-hp|xterm with hpterm function keys,
1328	kclr=\EJ,
1329	kcub1=\ED,
1330	kcud1=\EB,
1331	kcuf1=\EC,
1332	kcuu1=\EA,
1333	kdch1=\EP,
1334	kend=\EF,
1335	kf1=\Ep,
1336	kf2=\Eq,
1337	kf3=\Er,
1338	kf4=\Es,
1339	kf5=\Et,
1340	kf6=\Eu,
1341	kf7=\Ev,
1342	kf8=\Ew,
1343	khome=\Eh,
1344	kich1=\EQ,
1345	knp=\ES,
1346	kpp=\ET,
1347	use=xterm-basic,
1348#
1349# scoterm implements 48 function-keys using shift- and control-modifiers to
1350# multiple 12 function-keys.  X has a hard-coded limit of 35 function-keys,
1351# but xterm can represent larger values.
1352#
1353# XTerm resources:
1354# ---------------
1355# Set the modifyFunctionKeys resource to negative (-1) to make it simple to
1356# enter the higher function-key values using shift- and control-modifiers.
1357#
1358# Also, set ctrlFKeys resource to 12 (the default is 10) to make xterm see 48
1359# function-keys on a keyboard with 12 function-keys and 4 control/shift
1360# modifier combinations.
1361#
1362xterm-sco|xterm with SCO function keys,
1363	kbeg=\E[E,
1364	kdch1=^?,
1365	kf1=\E[M,
1366	kf10=\E[V,
1367	kf11=\E[W,
1368	kf12=\E[X,
1369	kf13=\E[Y,
1370	kf14=\E[Z,
1371	kf15=\E[a,
1372	kf16=\E[b,
1373	kf17=\E[c,
1374	kf18=\E[d,
1375	kf19=\E[e,
1376	kf2=\E[N,
1377	kf20=\E[f,
1378	kf21=\E[g,
1379	kf22=\E[h,
1380	kf23=\E[i,
1381	kf24=\E[j,
1382	kf25=\E[k,
1383	kf26=\E[l,
1384	kf27=\E[m,
1385	kf28=\E[n,
1386	kf29=\E[o,
1387	kf3=\E[O,
1388	kf30=\E[p,
1389	kf31=\E[q,
1390	kf32=\E[r,
1391	kf33=\E[s,
1392	kf34=\E[t,
1393	kf35=\E[u,
1394	kf36=\E[v,
1395	kf37=\E[w,
1396	kf38=\E[x,
1397	kf39=\E[y,
1398	kf4=\E[P,
1399	kf40=\E[z,
1400	kf41=\E[@,
1401	kf42=\E[[,
1402	kf43=\E[\\,
1403	kf44=\E[],
1404	kf45=\E[\^,
1405	kf46=\E[_,
1406	kf47=\E[`,
1407	kf48=\E[{,
1408	kf5=\E[Q,
1409	kf6=\E[R,
1410	kf7=\E[S,
1411	kf8=\E[T,
1412	kf9=\E[U,
1413	kich1=\E[L,
1414	kmous=\E[>M,
1415	knp=\E[G,
1416	kpp=\E[I,
1417	use=xterm+noapp,
1418	use=xterm-basic,
1419#
1420# Other variants (these are all very old entries, from X11R5):
1421xterm-24|xterms|vs100|xterm terminal emulator (X Window System),
1422	lines#24,
1423	use=xterm-old,
1424xterm-65|xterm with tall window 65x80 (X Window System),
1425	lines#65,
1426	use=xterm-old,
1427xterm-bold|xterm with bold instead of underline (X Window System),
1428	sgr=
1429		%?
1430			%p9
1431			%t\016
1432		%e
1433			\017
1434		%;
1435		B\E[0
1436		%?
1437			%p6
1438			%t;1
1439		%;
1440		%?
1441			%p2
1442			%t;1
1443		%;
1444		%?
1445			%p1%p3%|
1446			%t;7
1447		%;
1448		m,
1449	smso=\E[7m,
1450	smul=\E[1m,
1451	use=xterm-old,
1452xterm-boldso|xterm with bold for standout (X Window System),
1453	rmso=\E[m,
1454	smso=\E[1m,
1455	use=xterm-old,
1456xterm-mono|monochrome xterm,
1457	bce@,
1458	colors@,
1459	ncv@,
1460	pairs@,
1461	op@,
1462	setab@,
1463	setaf@,
1464	setb@,
1465	setf@,
1466	sgr@,
1467	use=xterm-old,
1468#
1469# VTxxx terminals are usually set up so that full-screen applications will use
1470# the cursor application mode strings.  This is good for full-screen
1471# applications, including legacy applications which may have hard-coded
1472# behavior, but bad for interactive shells (e.g., tcsh, bash) which use arrow
1473# keys to scroll through a history of command strings.
1474#
1475# To see the difference between normal/application modes, consider this example:
1476#	+ In normal (non-application) mode, the terminal transmits a down-arrow
1477#	  as \E[C, which happens to echo as a down-arrow.
1478#	+ In application mode the terminal transmits \EOC, which echoes as C.
1479#	  That is because the \EO is the SS3 control, which says to use the
1480#	  character from the G3 character set for the next cell.
1481#
1482# One example of hard-coded behavior would be for applications written to work
1483# with VT52 and VT100 terminals.  If the application's parser ignores 'O' and
1484# '?' characters after the escape, then the cursor and keypad strings for the
1485# two terminals are the same.  (Indeed, one of the first curses applications
1486# which I used did something like this to cover "ANSI" terminals -TD).
1487#
1488# To make this work (leaving the cursor keys in normal mode), we have to adjust
1489# the terminal initialization sequences:
1490#
1491#	smkx/rmkx set/reset the cursor and keypad application modes.  We retain
1492#		the latter (otherwise many applications fail).
1493#
1494#	smcup/rmcup set/restore cursor-addressing mode for full-screen
1495#		applications.  For xterm, this normally means the alternate
1496#		screen, which is not compatible with interactive shells.  Some
1497#		programs are "smart" and disable these.
1498#
1499xterm-noapp|xterm with cursor keys in normal mode,
1500	rmcup@,
1501	rmkx=\E>,
1502	smcup@,
1503	smkx=\E=,
1504	use=xterm+noapp,
1505	use=xterm,
1506
1507xterm+noapp|fragment with cursor keys in normal mode,
1508	kcub1=\E[D,
1509	kcud1=\E[B,
1510	kcuf1=\E[C,
1511	kcuu1=\E[A,
1512	use=xterm+noapp+pc,
1513
1514xterm+app|fragment with cursor keys in application mode,
1515	kcub1=\EOD,
1516	kcud1=\EOB,
1517	kcuf1=\EOC,
1518	kcuu1=\EOA,
1519	use=xterm+app+pc,
1520
1521xterm+noapp+pc|fragment for noapp pc-style home/end,
1522	kend=\E[F,
1523	khome=\E[H,
1524
1525xterm+app+pc|fragment for app pc-style home/end,
1526	kend=\EOF,
1527	khome=\EOH,
1528
1529xterm+edit|fragment for 6-key editing-keypad,
1530	kdch1=\E[3~,
1531	kich1=\E[2~,
1532	knp=\E[6~,
1533	kpp=\E[5~,
1534	use=xterm+pc+edit,
1535
1536xterm+decedit|fragment for vt220 6-key editing-keypad,
1537	kdch1=\E[3~,
1538	kich1=\E[2~,
1539	knp=\E[6~,
1540	kpp=\E[5~,
1541	use=xterm+vt+edit,
1542
1543xterm+pc+edit|fragment for pc-style editing keypad,
1544	kend=\E[4~,
1545	khome=\E[1~,
1546
1547xterm+vt+edit|fragment for vt220-style editing keypad,
1548	kfnd=\E[1~,
1549	kslt=\E[4~,
1550
1551xterm+noalt|xterm without altscreen,
1552	rmcup@,
1553	smcup@,
1554
1555xterm+alt1049|xterm 90 feature,
1556	rmcup=\E[?1049l,
1557	smcup=\E[?1049h,
1558
1559xterm+titlestack|xterm 251 feature,
1560	rmcup=\E[23;0;0t,
1561	smcup=\E[22;0;0t,
1562
1563xterm+alt+title|xterm 90 and 251 features combined,
1564	rmcup=\E[?1049l\E[23;0;0t,
1565	smcup=\E[?1049h\E[22;0;0t,
1566
1567# from development after ncurses 6.1:
1568# Xterm's emulation of the VT100 numeric keypad on a PC-keyboard runs into the
1569# problem that the keypad layout is different, and that the natural choice for
1570# PF1 is NumLock (which happens to be reserved for other use).  To work around
1571# that, PF1-PF4 are emulated via F1-F4, which leaves the "/", "*" and "+" not
1572# directly related to VT100.
1573#
1574# With the VT220 keypad block that uses the 1-9 keys as suggested in
1575# terminfo(5), the other keys can be handled with user-defined capabilities:
1576#
1577#   _______________________________________
1578#  | NumLock |    /    |    *    |    -    |
1579#  |         |   $Oo   |   $Oj   |   $OS   |
1580#  |_________|__kpDIV__|__kpMUL__|__kpSUB__|
1581#  |    7         8         9    |         |
1582#  |   $Ow   |   $Ox   |   $Oy   |    +    |
1583#  |_ka1__K1_|_________|_ka3__K3_|   $Ok   |
1584#  |    4    |    5    |    6    |  kpADD  |
1585#  |   $Ot   |   $Ou   |   $Ov   |         |
1586#  |_________|_kb2__K2_|_________|_________|
1587#  |    1    |    2    |    3    |         |
1588#  |   $Oq   |   $Or   |   $Os   |         |
1589#  |_kc1__K4_|_________|_kc3__K5_|  enter  |
1590#  |         0         |   .     |   $OM   |
1591#  |        $Op        |  $On    |         |
1592#  |___________________|_________|_kent_@8_|
1593xterm+keypad|xterm emulating VT100/VT220 numeric keypad,
1594	kp5=\EOE,
1595	kpADD=\EOk,
1596	kpCMA=\EOl,
1597	kpDIV=\EOo,
1598	kpDOT=\EOn,
1599	kpMUL=\EOj,
1600	kpSUB=\EOm,
1601	kpZRO=\EOp,
1602	use=vt220+keypad,
1603
1604# from development after ncurses 5.2:
1605# A better adaptation to modern keyboards such as the PC's, which have a dozen
1606# function keys and the keypad 2,4,6,8 keys are labeled with arrows keys, is to
1607# use the 5-key arrangement to model the arrow keys as suggested in the
1608# terminfo guidelines:
1609#   _______________________________________
1610#  |   PF1   |   PF2   |   PF3   |   PF4   |
1611#  |   $OP   |   $OQ   |   $OR   |   $OS   |
1612#  |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_|
1613#  |    7         8         9         -    |
1614#  |   $Ow   |   $Ox   |   $Oy   |   $Om   |
1615#  |_ka1__K1_|_________|_ka3__K3_|_________|
1616#  |    4    |    5    |    6    |    ,    |
1617#  |   $Ot   |   $Ou   |   $Ov   |   $Ol   |
1618#  |_________|_kb2__K2_|_________|_________|
1619#  |    1    |    2    |    3    |         |
1620#  |   $Oq   |   $Or   |   $Os   |  enter  |
1621#  |_kc1__K4_|_________|_kc3__K5_|  $OM    |
1622#  |         0         |   .     |         |
1623#  |        $Op        |  $On    |         |
1624#  |___________________|_________|_kent_@8_|
1625vt220+keypad|dec vt220 numeric keypad,
1626	ka1=\EOw,
1627	ka3=\EOy,
1628	kb2=\EOu,
1629	kc1=\EOq,
1630	kc3=\EOs,
1631	kent=\EOM,
1632	kf1=\EOP,
1633	kf2=\EOQ,
1634	kf3=\EOR,
1635	kf4=\EOS,
1636	ka2=\EOx,
1637	kb1=\EOt,
1638	kb3=\EOv,
1639	kc2=\EOr,
1640#
1641# This should work for the commonly used "color xterm" variations (XFree86
1642# xterm, color_xterm, nxterm, rxvt).  Note that it does not set 'bce', so for
1643# XFree86 and and rxvt, some applications that use colors will be less
1644# efficient, and in a few special cases (with "smart" optimization) the wrong
1645# color will be painted in spots.
1646xterm-color|generic "ANSI" color xterm (X Window System),
1647	colors#8,
1648	ncv@,
1649	pairs#64,
1650	op=\E[m,
1651	setab=\E[4%p1%dm,
1652	setaf=\E[3%p1%dm,
1653	use=xterm-r6,
1654#
1655# vi may work better with this entry, because vi
1656# doesn't use insert mode much
1657xterm-ic|xterm-vi|xterm with insert character instead of insert mode,
1658	mir@,
1659	ich=\E[%p1%d@,
1660	ich1=\E[@,
1661	rmir@,
1662	smir@,
1663	use=xterm,
1664#
1665# This is used only for testing (it's not relevant to DEC VTxxx terminals, but
1666# to ncurses).
1667xterm-xmc|xterm with magic-cookie glitch,
1668	xmc#1,
1669	use=xterm-new,
1670#
1671# This one was originally for testing ncurses.  While the ISO 6429 defines the
1672# REP control, none of the DEC VTxxx terminals (VT52 through VT525) support it.
1673#
1674# The feature's inclusion in xterm was prompted by changes in ncurses to
1675# support testing repeat_char by Alexander Lukyanov, since no readily-available
1676# terminal supported this:
1677#
1678# + Alexander's patch was integrated in ncurses 1996/09/28
1679# + xterm patch #32 1996/11/21 was released in XFree86 3.2A 1997/01/26
1680#
1681# In July 2017, the feature was added to xterm-new in ncurses, making this
1682# entry obsolete (but it is kept for reference).
1683xterm-rep|xterm with repeat-character control,
1684	rep=%p1%c\E[%p2%{1}%-%db,
1685	use=xterm-new,
1686#
1687# This is mainly for testing xterm; the real VT220 will not let you switch
1688# character sets without first altering the keyboard language in the setup
1689# screen.  Some emulators allow this anyway.  (Note that these strings are
1690# normally used only for printers).  The parameter to csnm and scs is the same
1691# in both cases:  the keyboard language parameter returned by CSI ? 2 6 n.
1692xterm-nrc|xterm with VT220 national replacement character sets,
1693	csnm=
1694		%?
1695			%p1%{1}%=
1696			%tNorth\sAmerican
1697		%e
1698			%p1%{2}%=
1699			%tBritish
1700		%e
1701			%p1%{3}%=
1702			%tFlemish
1703		%e
1704			%p1%{4}%=
1705			%tFrench\sCanadian
1706		%e
1707			%p1%{5}%=
1708			%tDanish
1709		%e
1710			%p1%{6}%=
1711			%tFinnish
1712		%e
1713			%p1%{7}%=
1714			%tGerman
1715		%e
1716			%p1%{8}%=
1717			%tDutch
1718		%e
1719			%p1%{9}%=
1720			%tItalian
1721		%e
1722			%p1%{10}%=
1723			%tSwiss\s(French)
1724		%e
1725			%p1%{11}%=
1726			%tSwiss\s(German)
1727		%e
1728			%p1%{12}%=
1729			%tSwedish
1730		%e
1731			%p1%{13}%=
1732			%tNorwegian
1733		%e
1734			%p1%{14}%=
1735			%tFrench/Belgian
1736		%e
1737			%p1%{15}%=
1738			%tSpanish
1739		%;,
1740	scs=
1741		%?
1742			%p1%{1}%=
1743			%t\E(B
1744		%e
1745			%p1%{2}%=
1746			%t\E(A
1747		%e
1748			%p1%{3}%=
1749			%t\E(R
1750		%e
1751			%p1%{4}%=
1752			%t\E(9
1753		%e
1754			%p1%{5}%=
1755			%t\E(E
1756		%e
1757			%p1%{6}%=
1758			%t\E(5
1759		%e
1760			%p1%{7}%=
1761			%t\E(K
1762		%e
1763			%p1%{8}%=
1764			%t\E(4
1765		%e
1766			%p1%{9}%=
1767			%t\E(Y
1768		%e
1769			%p1%{10}%=
1770			%t\E(=
1771		%e
1772			%p1%{11}%=
1773			%t\E(=
1774		%e
1775			%p1%{12}%=
1776			%t\E(7
1777		%e
1778			%p1%{13}%=
1779			%t\E(E
1780		%e
1781			%p1%{14}%=
1782			%t\E(R
1783		%e
1784			%p1%{15}%=
1785			%t\E(Z
1786		%;,
1787	use=xterm-new,
1788#
1789# Foreground 0-15 maps (with toggles) into 30-37 & 90-97
1790# Background 0-15 maps (with toggles) into 40-47 & 100-107
1791#
1792# Originally I suppressed setaf/setab, since ANSI specifies only 8 colors, but
1793# Stephen Marley persuaded me to allow the "ANSI" color controls to extend to
1794# 16 colors.  (Note that ncurses 4.2 uses setf/setb from this description;
1795# however 5.0 selects either according to their availability).  - T.Dickey
1796#
1797# SVr4 curses does not use more than 8 colors anyway, so using 16 colors is
1798# either for terminfo-level applications or via ncurses.
1799xterm-16color|xterm with 16 colors,
1800	colors#16,
1801	pairs#0x100,
1802	setab=\E[
1803		%?
1804			%p1%{8}%<
1805			%t%p1%{40}%+
1806		%e
1807			%p1%{92}%+
1808		%;
1809		%dm,
1810	setaf=\E[
1811		%?
1812			%p1%{8}%<
1813			%t%p1%{30}%+
1814		%e
1815			%p1%{82}%+
1816		%;
1817		%dm,
1818	setb=
1819		%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa
1820		%?%ga%{1}%=
1821			%t4
1822		%e%ga%{3}%=
1823			%t6
1824		%e%ga%{4}%=
1825			%t1
1826		%e%ga%{6}%=
1827			%t3
1828		%e%ga%d
1829		%;
1830		m,
1831	setf=
1832		%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa
1833		%?%ga%{1}%=
1834			%t4
1835		%e%ga%{3}%=
1836			%t6
1837		%e%ga%{4}%=
1838			%t1
1839		%e%ga%{6}%=
1840			%t3
1841		%e%ga%d
1842		%;
1843		m,
1844	use=xterm+256color2,
1845	use=xterm+osc104,
1846	use=xterm-new,
1847
1848# xterm OSC 104 resets the color palette.  Using it as part of xterm+256color
1849# has the drawback that some of the xterm-alikes which use that building block
1850# require a different approach to rs1 -TD
1851xterm+osc104|reset color palette,
1852	oc=\E]104\007,
1853	rs1=\Ec\E]104\007,
1854
1855# "indexed color" is mentioned without definition in ISO 8613-6 (ITU T.416).
1856#
1857# This implementation uses a 256-element color map where the first 16 entries
1858# are shared with the aixterm-compatible colors (and in turn the first 8 are
1859# shared with the ANSI colors).  The three levels (256, 16, 8) account for the
1860# use of a conditional expression in setaf/setab which reduces the number of
1861# characters sent to the screen for typical applications.
1862#
1863# 256 colors should give 65536 pairs, but SVr4 (legacy) terminfo stores numbers
1864# in a signed short.  Most people will not notice problems with only 32767
1865# pairs.  With ncurses 6.1, numbers are stored in a signed integer (at least
1866# 32-bits), and the inconsistency regarding pairs is eliminated.
1867xterm+256color|original xterm 256-color feature,
1868	ccc,
1869	colors#0x100,
1870	pairs#0x10000,
1871	initc=\E]4;
1872		%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
1873	oc=\E]104\007,
1874	setab=\E[
1875		%?
1876			%p1%{8}%<
1877			%t4%p1%d
1878		%e
1879			%p1%{16}%<
1880			%t10%p1%{8}%-%d
1881		%e48;5;
1882			%p1%d
1883		%;
1884		m,
1885	setaf=\E[
1886		%?
1887			%p1%{8}%<
1888			%t3%p1%d
1889		%e
1890			%p1%{16}%<
1891			%t9%p1%{8}%-%d
1892		%e38;5;
1893			%p1%d
1894		%;
1895		m,
1896	setb@,
1897	setf@,
1898xterm+256color2|xterm 256-color feature,
1899	setab=\E[
1900		%?
1901			%p1%{8}%<
1902			%t4%p1%d
1903		%e
1904			%p1%{16}%<
1905			%t10%p1%{8}%-%d
1906		%e48\:5\:
1907			%p1%d
1908		%;
1909		m,
1910	setaf=\E[
1911		%?
1912			%p1%{8}%<
1913			%t3%p1%d
1914		%e
1915			%p1%{16}%<
1916			%t9%p1%{8}%-%d
1917		%e38\:5\:
1918			%p1%d
1919		%;
1920		m,
1921	use=xterm+256color,
1922xterm-256color|xterm with 256 colors,
1923	use=xterm+256color2,
1924	use=xterm+osc104,
1925	use=xterm-new,
1926xterm-88color|xterm with 88 colors,
1927	colors#88,
1928	pairs#7744,
1929	use=xterm-256color,
1930
1931# "direct color" is mentioned without definition in ISO 8613-6 (ITU T.416).
1932#
1933# This is a particular implementation which assume 8-bit values for red, green,
1934# and blue.  Other encodings are possible; none are addressed by that standard.
1935#
1936# The "RGB" flag is an ncurses 6.1 extension which tells the library how to
1937# quickly compute the color-content for a given color value.
1938#
1939# Like xterm+256color, this uses a conditional expression.  But it does that
1940# for a different reason: to make it readily usable for applications which
1941# print text but also use RGB colors, it uses a color map for the usual ANSI
1942# colors (0-7) and RGB colors for the remaining range of the color value.
1943xterm+direct|xterm with direct-color indexing,
1944	RGB,
1945	colors#0x1000000,
1946	pairs#0x10000,
1947	CO#8,
1948	initc@,
1949	op=\E[39;49m,
1950	setab=\E[
1951		%?
1952			%p1%{8}%<
1953			%t4%p1%d
1954		%e48\:2\:\:
1955			%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d
1956		%;
1957		m,
1958	setaf=\E[
1959		%?
1960			%p1%{8}%<
1961			%t3%p1%d
1962		%e38\:2\:\:
1963			%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d
1964		%;
1965		m,
1966	setb@,
1967	setf@,
1968xterm-direct|xterm with direct-color indexing,
1969	use=xterm+direct,
1970	use=xterm,
1971#
1972# This is an 8-bit version of xterm, which emulates DEC vt220 with ANSI color.
1973# To use it, your decTerminalID resource must be set to 200 or above, and the
1974# sunKeyboard resource set to true.
1975#
1976#	HTS	\E H	\210
1977#	RI	\E M	\215
1978#	SS3	\E O	\217
1979#	CSI	\E [	\233
1980#
1981xterm-8bit|xterm terminal emulator with 8-bit controls (X Window System),
1982	OTbs,
1983	am,
1984	bce,
1985	km,
1986	mc5i,
1987	mir,
1988	msgr,
1989	npc,
1990	xenl,
1991	AX,
1992	colors#8,
1993	cols#80,
1994	it#8,
1995	lines#24,
1996	pairs#64,
1997	acsc=``aaffggiijjkkllmmnnooppqqr
1998	     rssttuuvvwwxxyyzz{{||}}~~,
1999	bel=^G,
2000	blink=\2335m,
2001	bold=\2331m,
2002	cbt=\233Z,
2003	civis=\233?25l,
2004	clear=\233H\2332J,
2005	cnorm=\233?25l\233?25h,
2006	cr=\r,
2007	csr=\233%i%p1%d;%p2%dr,
2008	cub=\233%p1%dD,
2009	cub1=^H,
2010	cud=\233%p1%dB,
2011	cud1=\n,
2012	cuf=\233%p1%dC,
2013	cuf1=\233C,
2014	cup=\233%i%p1%d;%p2%dH,
2015	cuu=\233%p1%dA,
2016	cuu1=\233A,
2017	cvvis=\233?12;25h,
2018	dch=\233%p1%dP,
2019	dch1=\233P,
2020	dl=\233%p1%dM,
2021	dl1=\233M,
2022	ech=\233%p1%dX,
2023	ed=\233J,
2024	el=\233K,
2025	el1=\2331K,
2026	flash=\233?5h$<100/>\233?5l,
2027	home=\233H,
2028	hpa=\233%i%p1%dG,
2029	ht=^I,
2030	hts=\210,
2031	ich=\233%p1%d@,
2032	il=\233%p1%dL,
2033	il1=\233L,
2034	ind=\n,
2035	invis=\2338m,
2036	is2=\E[62"p\E\sG\233m\233?7h\E>
2037	    \E7\233?1;3;4;6l\2334l\233r
2038	    \E8,
2039	ka1=\217w,
2040	ka3=\217u,
2041	kb2=\217y,
2042	kbeg=\217E,
2043	kc1=\217q,
2044	kc3=\217s,
2045	kcbt=\233Z,
2046	kcub1=\217D,
2047	kcud1=\217B,
2048	kcuf1=\217C,
2049	kcuu1=\217A,
2050	kdch1=\2333~,
2051	kend=\2334~,
2052	kent=\217M,
2053	kf1=\23311~,
2054	kf10=\23321~,
2055	kf11=\23323~,
2056	kf12=\23324~,
2057	kf13=\23325~,
2058	kf14=\23326~,
2059	kf15=\23328~,
2060	kf16=\23329~,
2061	kf17=\23331~,
2062	kf18=\23332~,
2063	kf19=\23333~,
2064	kf2=\23312~,
2065	kf20=\23334~,
2066	kf3=\23313~,
2067	kf4=\23314~,
2068	kf5=\23315~,
2069	kf6=\23317~,
2070	kf7=\23318~,
2071	kf8=\23319~,
2072	kf9=\23320~,
2073	khome=\2331~,
2074	kich1=\2332~,
2075	kmous=\233M,
2076	knp=\2336~,
2077	kpp=\2335~,
2078	mc0=\233i,
2079	mc4=\2334i,
2080	mc5=\2335i,
2081	meml=\El,
2082	memu=\Em,
2083	op=\23339;49m,
2084	rc=\E8,
2085	rev=\2337m,
2086	ri=\215,
2087	rmacs=\E(B,
2088	rmam=\233?7l,
2089	rmcup=\233?1049l,
2090	rmir=\2334l,
2091	rmkx=\233?1l\E>,
2092	rmso=\23327m,
2093	rmul=\23324m,
2094	rs1=\Ec,
2095	rs2=\E[62"p\E\sG\233m\233?7h\E>
2096	    \E7\233?1;3;4;6l\2334l\233r
2097	    \E8,
2098	sc=\E7,
2099	setab=\2334%p1%dm,
2100	setaf=\2333%p1%dm,
2101	setb=\2334
2102		%?
2103			%p1%{1}%=
2104			%t4
2105		%e
2106			%p1%{3}%=
2107			%t6
2108		%e
2109			%p1%{4}%=
2110			%t1
2111		%e
2112			%p1%{6}%=
2113			%t3
2114		%e
2115			%p1%d
2116		%;
2117		m,
2118	setf=\2333
2119		%?
2120			%p1%{1}%=
2121			%t4
2122		%e
2123			%p1%{3}%=
2124			%t6
2125		%e
2126			%p1%{4}%=
2127			%t1
2128		%e
2129			%p1%{6}%=
2130			%t3
2131		%e
2132			%p1%d
2133		%;
2134		m,
2135	sgr=\2330
2136		%?
2137			%p6
2138			%t;1
2139		%;
2140		%?
2141			%p2
2142			%t;4
2143		%;
2144		%?
2145			%p1%p3%|
2146			%t;7
2147		%;
2148		%?
2149			%p4
2150			%t;5
2151		%;
2152		%?
2153			%p7
2154			%t;8
2155		%;
2156		m
2157		%?
2158			%p9
2159			%t\E(0
2160		%e
2161			\E(B
2162		%;,
2163	sgr0=\2330m\E(B,
2164	smacs=\E(0,
2165	smam=\233?7h,
2166	smcup=\233?1049h,
2167	smir=\2334h,
2168	smkx=\233?1h\E=,
2169	smso=\2337m,
2170	smul=\2334m,
2171	tbc=\2333g,
2172	u6=\233[%i%d;%dR,
2173	u7=\E[6n,
2174	u8=\233[?%[;0123456789]c,
2175	u9=\E[c,
2176	vpa=\233%i%p1%dd,
2177	use=xterm+kbs,
2178#
2179xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System),
2180	OTbs,
2181	am,
2182	bce,
2183	km,
2184	mc5i,
2185	mir,
2186	msgr,
2187	npc,
2188	xenl,
2189	AX,
2190	XT,
2191	colors#8,
2192	cols#80,
2193	it#8,
2194	lines#24,
2195	pairs#64,
2196	acsc=``aaffggiijjkkllmmnnooppqqr
2197	     rssttuuvvwwxxyyzz{{||}}~~,
2198	bel=^G,
2199	blink=\E[5m,
2200	bold=\E[1m,
2201	cbt=\E[Z,
2202	civis=\E[?25l,
2203	clear=\E[H\E[2J,
2204	cnorm=\E[?12l\E[?25h,
2205	cr=\r,
2206	csr=\E[%i%p1%d;%p2%dr,
2207	cub=\E[%p1%dD,
2208	cub1=^H,
2209	cud=\E[%p1%dB,
2210	cud1=\n,
2211	cuf=\E[%p1%dC,
2212	cuf1=\E[C,
2213	cup=\E[%i%p1%d;%p2%dH,
2214	cuu=\E[%p1%dA,
2215	cuu1=\E[A,
2216	cvvis=\E[?12;25h,
2217	dch=\E[%p1%dP,
2218	dch1=\E[P,
2219	dl=\E[%p1%dM,
2220	dl1=\E[M,
2221	ech=\E[%p1%dX,
2222	ed=\E[J,
2223	el=\E[K,
2224	el1=\E[1K,
2225	enacs=\E(B\E)0,
2226	flash=\E[?5h$<100/>\E[?5l,
2227	home=\E[H,
2228	hpa=\E[%i%p1%dG,
2229	ht=^I,
2230	hts=\EH,
2231	ich=\E[%p1%d@,
2232	il=\E[%p1%dL,
2233	il1=\E[L,
2234	ind=\n,
2235	indn=\E[%p1%dS,
2236	invis=\E[8m,
2237	is2=\E[!p\E[?3;4l\E[4l\E>,
2238	kDC=\E[3;2~,
2239	kEND=\E[1;2F,
2240	kHOM=\E[1;2H,
2241	kIC=\E[2;2~,
2242	kLFT=\E[1;2D,
2243	kNXT=\E[6;2~,
2244	kPRV=\E[5;2~,
2245	kRIT=\E[1;2C,
2246	kb2=\EOE,
2247	kcbt=\E[Z,
2248	kcub1=\EOD,
2249	kcud1=\EOB,
2250	kcuf1=\EOC,
2251	kcuu1=\EOA,
2252	kdch1=\E[3~,
2253	kend=\EOF,
2254	kent=\EOM,
2255	kf1=\EOP,
2256	kf10=\E[21~,
2257	kf11=\E[23~,
2258	kf12=\E[24~,
2259	kf13=\EO2P,
2260	kf14=\EO2Q,
2261	kf15=\EO2R,
2262	kf16=\EO2S,
2263	kf17=\E[15;2~,
2264	kf18=\E[17;2~,
2265	kf19=\E[18;2~,
2266	kf2=\EOQ,
2267	kf20=\E[19;2~,
2268	kf21=\E[20;2~,
2269	kf22=\E[21;2~,
2270	kf23=\E[23;2~,
2271	kf24=\E[24;2~,
2272	kf25=\EO5P,
2273	kf26=\EO5Q,
2274	kf27=\EO5R,
2275	kf28=\EO5S,
2276	kf29=\E[15;5~,
2277	kf3=\EOR,
2278	kf30=\E[17;5~,
2279	kf31=\E[18;5~,
2280	kf32=\E[19;5~,
2281	kf33=\E[20;5~,
2282	kf34=\E[21;5~,
2283	kf35=\E[23;5~,
2284	kf36=\E[24;5~,
2285	kf37=\EO6P,
2286	kf38=\EO6Q,
2287	kf39=\EO6R,
2288	kf4=\EOS,
2289	kf40=\EO6S,
2290	kf41=\E[15;6~,
2291	kf42=\E[17;6~,
2292	kf43=\E[18;6~,
2293	kf44=\E[19;6~,
2294	kf45=\E[20;6~,
2295	kf46=\E[21;6~,
2296	kf47=\E[23;6~,
2297	kf48=\E[24;6~,
2298	kf5=\E[15~,
2299	kf6=\E[17~,
2300	kf7=\E[18~,
2301	kf8=\E[19~,
2302	kf9=\E[20~,
2303	khome=\EOH,
2304	kich1=\E[2~,
2305	kmous=\E[M,
2306	knp=\E[6~,
2307	kpp=\E[5~,
2308	mc0=\E[i,
2309	mc4=\E[4i,
2310	mc5=\E[5i,
2311	meml=\El,
2312	memu=\Em,
2313	op=\E[39;49m,
2314	rc=\E8,
2315	rev=\E[7m,
2316	ri=\EM,
2317	rin=\E[%p1%dT,
2318	rmacs=^O,
2319	rmam=\E[?7l,
2320	rmir=\E[4l,
2321	rmkx=\E[?1l\E>,
2322	rmso=\E[27m,
2323	rmul=\E[24m,
2324	rs1=\Ec,
2325	rs2=\E[!p\E[?3;4l\E[4l\E>,
2326	sc=\E7,
2327	setab=\E[4%p1%dm,
2328	setaf=\E[3%p1%dm,
2329	setb=\E[4
2330		%?
2331			%p1%{1}%=
2332			%t4
2333		%e
2334			%p1%{3}%=
2335			%t6
2336		%e
2337			%p1%{4}%=
2338			%t1
2339		%e
2340			%p1%{6}%=
2341			%t3
2342		%e
2343			%p1%d
2344		%;
2345		m,
2346	setf=\E[3
2347		%?
2348			%p1%{1}%=
2349			%t4
2350		%e
2351			%p1%{3}%=
2352			%t6
2353		%e
2354			%p1%{4}%=
2355			%t1
2356		%e
2357			%p1%{6}%=
2358			%t3
2359		%e
2360			%p1%d
2361		%;
2362		m,
2363	sgr=\E[0
2364		%?
2365			%p6
2366			%t;1
2367		%;
2368		%?
2369			%p2
2370			%t;4
2371		%;
2372		%?
2373			%p1%p3%|
2374			%t;7
2375		%;
2376		%?
2377			%p4
2378			%t;5
2379		%;
2380		%?
2381			%p7
2382			%t;8
2383		%;
2384		m
2385		%?
2386			%p9
2387			%t\016
2388		%e
2389			\017
2390		%;,
2391	sgr0=\E[m\017,
2392	smacs=^N,
2393	smam=\E[?7h,
2394	smir=\E[4h,
2395	smkx=\E[?1h\E=,
2396	smso=\E[7m,
2397	smul=\E[4m,
2398	tbc=\E[3g,
2399	u6=\E[%i%d;%dR,
2400	u7=\E[6n,
2401	u8=\E[?1;2c,
2402	u9=\E[c,
2403	vpa=\E[%i%p1%dd,
2404	ka2=\EOx,
2405	kb1=\EOt,
2406	kb3=\EOv,
2407	kc2=\EOr,
2408	use=xterm+alt1049,
2409	use=xterm+kbs,
2410xterm-xfree86|xterm terminal emulator (XFree86 4.4 Window System),
2411	use=xterm-xf86-v44,
2412#
2413# Compatible with the R6 xterm, with the following changes:
2414#	+ added acsc (perhaps some versions of tic assume the standard vt100
2415#	  alternate character set)
2416#	+ added u6, u7, u8, u9 strings for Daniel Weaver's tack program.
2417#	+ added kmous string for ncurses.
2418#	+ added khome/kend strings (which conflict with kfnd/kslt, see note).
2419xterm-r6|xterm X11R6 version,
2420	OTbs,
2421	am,
2422	km,
2423	mir,
2424	msgr,
2425	xenl,
2426	cols#80,
2427	it#8,
2428	lines#24,
2429	acsc=``aaffggiijjkkllmmnnooppqqr
2430	     rssttuuvvwwxxyyzz{{||}}~~,
2431	bel=^G,
2432	bold=\E[1m,
2433	clear=\E[H\E[2J,
2434	cr=\r,
2435	csr=\E[%i%p1%d;%p2%dr,
2436	cub=\E[%p1%dD,
2437	cub1=^H,
2438	cud=\E[%p1%dB,
2439	cud1=\n,
2440	cuf=\E[%p1%dC,
2441	cuf1=\E[C,
2442	cup=\E[%i%p1%d;%p2%dH,
2443	cuu=\E[%p1%dA,
2444	cuu1=\E[A,
2445	dch=\E[%p1%dP,
2446	dch1=\E[P,
2447	dl=\E[%p1%dM,
2448	dl1=\E[M,
2449	ed=\E[J,
2450	el=\E[K,
2451	enacs=\E)0,
2452	home=\E[H,
2453	ht=^I,
2454	hts=\EH,
2455	il=\E[%p1%dL,
2456	il1=\E[L,
2457	ind=\n,
2458	is2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[
2459	    ?1;3;4;6l\E8,
2460	kcub1=\EOD,
2461	kcud1=\EOB,
2462	kcuf1=\EOC,
2463	kcuu1=\EOA,
2464	kdch1=\E[3~,
2465	kf1=\E[11~,
2466	kf10=\E[21~,
2467	kf11=\E[23~,
2468	kf12=\E[24~,
2469	kf13=\E[25~,
2470	kf14=\E[26~,
2471	kf15=\E[28~,
2472	kf16=\E[29~,
2473	kf17=\E[31~,
2474	kf18=\E[32~,
2475	kf19=\E[33~,
2476	kf2=\E[12~,
2477	kf20=\E[34~,
2478	kf3=\E[13~,
2479	kf4=\E[14~,
2480	kf5=\E[15~,
2481	kf6=\E[17~,
2482	kf7=\E[18~,
2483	kf8=\E[19~,
2484	kf9=\E[20~,
2485	kmous=\E[M,
2486	meml=\El,
2487	memu=\Em,
2488	rc=\E8,
2489	rev=\E[7m,
2490	ri=\EM,
2491	rmacs=^O,
2492	rmcup=\E[2J\E[?47l\E8,
2493	rmir=\E[4l,
2494	rmkx=\E[?1l\E>,
2495	rmso=\E[m,
2496	rmul=\E[m,
2497	rs2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[
2498	    ?1;3;4;6l\E8,
2499	sc=\E7,
2500	sgr0=\E[m,
2501	smacs=^N,
2502	smcup=\E7\E[?47h,
2503	smir=\E[4h,
2504	smkx=\E[?1h\E=,
2505	smso=\E[7m,
2506	smul=\E[4m,
2507	tbc=\E[3g,
2508	u6=\E[%i%d;%dR,
2509	u7=\E[6n,
2510	u8=\E[?1;2c,
2511	u9=\E[c,
2512	use=xterm+kbs,
2513	use=xterm+decedit,
2514xterm-old|antique xterm version,
2515	use=xterm-r6,
2516#
2517# Compatible with the R5 xterm, with the following changes:
2518#	+ changed 'blink=@', to 'blink@' (the former meant that "@" would start
2519#	  a blink, the latter that it is not supported).
2520#	+ changed kf1 through kf4 to correspond with actual usage.  Though X
2521#	  supports keypad symbols for PF1 to PF4, and xterm interprets these
2522#	  correctly, the F1 to F4 codes are commonly (but incorrectly) used.
2523#	+ moved reset string from rs1 to rs2, to correlate better with termcap.
2524#	+ make khome consistent with other entries.
2525#	+ use rmul/smul, rmir/smir from termcap, but not rmcup/smcup because
2526#	  not everyone wants the alternate screen.
2527#	+ added u6, u7, u8, u9 strings for Daniel Weaver's tack program.
2528#	+ added kmous string for ncurses.
2529xterm-r5|xterm R5 version,
2530	OTbs,
2531	am,
2532	km,
2533	msgr,
2534	xenl,
2535	cols#80,
2536	it#8,
2537	lines#24,
2538	bel=^G,
2539	bold=\E[1m,
2540	clear=\E[H\E[2J,
2541	cr=\r,
2542	csr=\E[%i%p1%d;%p2%dr,
2543	cub=\E[%p1%dD,
2544	cub1=^H,
2545	cud=\E[%p1%dB,
2546	cud1=\n,
2547	cuf=\E[%p1%dC,
2548	cuf1=\E[C,
2549	cup=\E[%i%p1%d;%p2%dH,
2550	cuu=\E[%p1%dA,
2551	cuu1=\E[A,
2552	dch=\E[%p1%dP,
2553	dch1=\E[P,
2554	dl=\E[%p1%dM,
2555	dl1=\E[M,
2556	ed=\E[J,
2557	el=\E[K,
2558	home=\E[H,
2559	ht=^I,
2560	hts=\EH,
2561	ich=\E[%p1%d@,
2562	ich1=\E[@,
2563	il=\E[%p1%dL,
2564	il1=\E[L,
2565	ind=\n,
2566	kcub1=\EOD,
2567	kcud1=\EOB,
2568	kcuf1=\EOC,
2569	kcuu1=\EOA,
2570	kdch1=\E[3~,
2571	kdl1=\E[31~,
2572	kel=\E[8~,
2573	kend=\E[4~,
2574	kf0=\EOq,
2575	kf1=\E[11~,
2576	kf10=\E[21~,
2577	kf11=\E[23~,
2578	kf12=\E[24~,
2579	kf2=\E[12~,
2580	kf3=\E[13~,
2581	kf4=\E[14~,
2582	kf5=\E[15~,
2583	kf6=\E[17~,
2584	kf7=\E[18~,
2585	kf8=\E[19~,
2586	kf9=\E[20~,
2587	khome=\E[1~,
2588	kich1=\E[2~,
2589	kil1=\E[30~,
2590	kmous=\E[M,
2591	knp=\E[6~,
2592	kpp=\E[5~,
2593	rc=\E8,
2594	rev=\E[7m,
2595	ri=\EM,
2596	rmir=\E[4l,
2597	rmkx=\E[?1l\E>,
2598	rmso=\E[m,
2599	rmul=\E[m,
2600	rs2=\E>\E[?1;3;4;5;6l\E[4l\E[?7h
2601	    \E[m\E[r\E[2J\E[H,
2602	sc=\E7,
2603	sgr=\E[
2604		%?
2605			%p1
2606			%t;7
2607		%;
2608		%?
2609			%p2
2610			%t;4
2611		%;
2612		%?
2613			%p3
2614			%t;7
2615		%;
2616		%?
2617			%p4
2618			%t;5
2619		%;
2620		%?
2621			%p6
2622			%t;1
2623		%;
2624		m,
2625	sgr0=\E[m,
2626	smir=\E[4h,
2627	smkx=\E[?1h\E=,
2628	smso=\E[7m,
2629	smul=\E[4m,
2630	tbc=\E[3g,
2631	u6=\E[%i%d;%dR,
2632	u7=\E[6n,
2633	u8=\E[?1;2c,
2634	u9=\E[c,
2635	use=xterm+kbs,
2636#
2637#
2638# Customization begins here.
2639#
2640# This is the only entry which you should have to customize, since "xterm"
2641# is widely used for a variety of incompatible terminal emulations including
2642# color_xterm and rxvt.
2643xterm|X11 terminal emulator,
2644	use=xterm-new,
2645#	use=xterm-r6,
2646
2647# This fragment is for people who cannot agree on what the backspace key
2648# should send.
2649xterm+kbs|fragment for backspace key,
2650	kbs=^H,
2651#	kbs=^?,
2652