1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package sun
22
23 import "github.com/gdamore/tcell/v2/terminfo"
24
25 func init() {
26
27
28 terminfo.AddTerminfo(&terminfo.Terminfo{
29 Name: "sun",
30 Aliases: []string{"sun1", "sun2"},
31 Columns: 80,
32 Lines: 34,
33 Bell: "\a",
34 Clear: "\f",
35 AttrOff: "\x1b[m",
36 Reverse: "\x1b[7m",
37 PadChar: "\x00",
38 SetCursor: "\x1b[%i%p1%d;%p2%dH",
39 CursorBack1: "\b",
40 CursorUp1: "\x1b[A",
41 KeyUp: "\x1b[A",
42 KeyDown: "\x1b[B",
43 KeyRight: "\x1b[C",
44 KeyLeft: "\x1b[D",
45 KeyInsert: "\x1b[247z",
46 KeyDelete: "\u007f",
47 KeyBackspace: "\b",
48 KeyHome: "\x1b[214z",
49 KeyEnd: "\x1b[220z",
50 KeyPgUp: "\x1b[216z",
51 KeyPgDn: "\x1b[222z",
52 KeyF1: "\x1b[224z",
53 KeyF2: "\x1b[225z",
54 KeyF3: "\x1b[226z",
55 KeyF4: "\x1b[227z",
56 KeyF5: "\x1b[228z",
57 KeyF6: "\x1b[229z",
58 KeyF7: "\x1b[230z",
59 KeyF8: "\x1b[231z",
60 KeyF9: "\x1b[232z",
61 KeyF10: "\x1b[233z",
62 KeyF11: "\x1b[234z",
63 KeyF12: "\x1b[235z",
64 AutoMargin: true,
65 InsertChar: "\x1b[@",
66 })
67
68
69 terminfo.AddTerminfo(&terminfo.Terminfo{
70 Name: "sun-color",
71 Columns: 80,
72 Lines: 34,
73 Colors: 256,
74 Bell: "\a",
75 Clear: "\f",
76 AttrOff: "\x1b[m",
77 Bold: "\x1b[1m",
78 Reverse: "\x1b[7m",
79 SetFg: "\x1b[38;5;%p1%dm",
80 SetBg: "\x1b[48;5;%p1%dm",
81 ResetFgBg: "\x1b[0m",
82 PadChar: "\x00",
83 SetCursor: "\x1b[%i%p1%d;%p2%dH",
84 CursorBack1: "\b",
85 CursorUp1: "\x1b[A",
86 KeyUp: "\x1b[A",
87 KeyDown: "\x1b[B",
88 KeyRight: "\x1b[C",
89 KeyLeft: "\x1b[D",
90 KeyInsert: "\x1b[247z",
91 KeyDelete: "\u007f",
92 KeyBackspace: "\b",
93 KeyHome: "\x1b[214z",
94 KeyEnd: "\x1b[220z",
95 KeyPgUp: "\x1b[216z",
96 KeyPgDn: "\x1b[222z",
97 KeyF1: "\x1b[224z",
98 KeyF2: "\x1b[225z",
99 KeyF3: "\x1b[226z",
100 KeyF4: "\x1b[227z",
101 KeyF5: "\x1b[228z",
102 KeyF6: "\x1b[229z",
103 KeyF7: "\x1b[230z",
104 KeyF8: "\x1b[231z",
105 KeyF9: "\x1b[232z",
106 KeyF10: "\x1b[233z",
107 KeyF11: "\x1b[234z",
108 KeyF12: "\x1b[235z",
109 AutoMargin: true,
110 InsertChar: "\x1b[@",
111 })
112 }
113
View as plain text