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