1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package xterm
22
23 import "github.com/gdamore/tcell/v2/terminfo"
24
25 func init() {
26
27
28 terminfo.AddTerminfo(&terminfo.Terminfo{
29 Name: "xterm-direct",
30 Aliases: []string{"xterm-truecolor"},
31 Columns: 80,
32 Lines: 24,
33 Colors: 256,
34 Bell: "\a",
35 Clear: "\x1b[H\x1b[2J",
36 EnterCA: "\x1b[?1049h\x1b[22;0;0t",
37 ExitCA: "\x1b[?1049l\x1b[23;0;0t",
38 ShowCursor: "\x1b[?12l\x1b[?25h",
39 HideCursor: "\x1b[?25l",
40 AttrOff: "\x1b(B\x1b[m",
41 Underline: "\x1b[4m",
42 Bold: "\x1b[1m",
43 Dim: "\x1b[2m",
44 Italic: "\x1b[3m",
45 Blink: "\x1b[5m",
46 Reverse: "\x1b[7m",
47 EnterKeypad: "\x1b[?1h\x1b=",
48 ExitKeypad: "\x1b[?1l\x1b>",
49 SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
50 SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
51 SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
52 SetFgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%dm",
53 SetBgRGB: "\x1b[48;2;%p1%d;%p2%d;%p3%dm",
54 SetFgBgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%d;48;2;%p4%d;%p5%d;%p6%dm",
55 ResetFgBg: "\x1b[39;49m",
56 AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
57 EnterAcs: "\x1b(0",
58 ExitAcs: "\x1b(B",
59 StrikeThrough: "\x1b[9m",
60 Mouse: "\x1b[M",
61 SetCursor: "\x1b[%i%p1%d;%p2%dH",
62 CursorBack1: "\b",
63 CursorUp1: "\x1b[A",
64 KeyUp: "\x1bOA",
65 KeyDown: "\x1bOB",
66 KeyRight: "\x1bOC",
67 KeyLeft: "\x1bOD",
68 KeyInsert: "\x1b[2~",
69 KeyDelete: "\x1b[3~",
70 KeyBackspace: "\u007f",
71 KeyHome: "\x1bOH",
72 KeyEnd: "\x1bOF",
73 KeyPgUp: "\x1b[5~",
74 KeyPgDn: "\x1b[6~",
75 KeyF1: "\x1bOP",
76 KeyF2: "\x1bOQ",
77 KeyF3: "\x1bOR",
78 KeyF4: "\x1bOS",
79 KeyF5: "\x1b[15~",
80 KeyF6: "\x1b[17~",
81 KeyF7: "\x1b[18~",
82 KeyF8: "\x1b[19~",
83 KeyF9: "\x1b[20~",
84 KeyF10: "\x1b[21~",
85 KeyF11: "\x1b[23~",
86 KeyF12: "\x1b[24~",
87 KeyBacktab: "\x1b[Z",
88 Modifiers: 1,
89 AutoMargin: true,
90 TrueColor: true,
91 })
92 }
93
View as plain text