1
2
3 package wy99_ansi
4
5 import "github.com/gdamore/tcell/v2/terminfo"
6
7 func init() {
8
9
10 terminfo.AddTerminfo(&terminfo.Terminfo{
11 Name: "wy99-ansi",
12 Columns: 80,
13 Lines: 25,
14 Bell: "\a",
15 Clear: "\x1b[H\x1b[J$<200>",
16 ShowCursor: "\x1b[34h\x1b[?25h",
17 HideCursor: "\x1b[?25l",
18 AttrOff: "\x1b[m\x0f\x1b[\"q",
19 Underline: "\x1b[4m",
20 Bold: "\x1b[1m",
21 Dim: "\x1b[2m",
22 Blink: "\x1b[5m",
23 Reverse: "\x1b[7m",
24 EnterKeypad: "\x1b[?1h",
25 ExitKeypad: "\x1b[?1l",
26 PadChar: "\x00",
27 AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~",
28 EnterAcs: "\x0e",
29 ExitAcs: "\x0f",
30 EnableAcs: "\x1b)0",
31 SetCursor: "\x1b[%i%p1%d;%p2%dH",
32 CursorBack1: "\b$<1>",
33 CursorUp1: "\x1bM",
34 KeyUp: "\x1bOA",
35 KeyDown: "\x1bOB",
36 KeyRight: "\x1bOC",
37 KeyLeft: "\x1bOD",
38 KeyBackspace: "\b",
39 KeyF1: "\x1bOP",
40 KeyF2: "\x1bOQ",
41 KeyF3: "\x1bOR",
42 KeyF4: "\x1bOS",
43 KeyF5: "\x1b[M",
44 KeyF6: "\x1b[17~",
45 KeyF7: "\x1b[18~",
46 KeyF8: "\x1b[19~",
47 KeyF9: "\x1b[20~",
48 KeyF10: "\x1b[21~",
49 KeyF11: "\x1b[23~",
50 KeyF12: "\x1b[24~",
51 KeyF17: "\x1b[K",
52 KeyF18: "\x1b[31~",
53 KeyF19: "\x1b[32~",
54 KeyF20: "\x1b[33~",
55 KeyF21: "\x1b[34~",
56 KeyF22: "\x1b[35~",
57 KeyF23: "\x1b[1~",
58 KeyF24: "\x1b[2~",
59 KeyBacktab: "\x1b[z",
60 AutoMargin: true,
61 })
62
63
64 terminfo.AddTerminfo(&terminfo.Terminfo{
65 Name: "wy99a-ansi",
66 Columns: 80,
67 Lines: 25,
68 Bell: "\a",
69 Clear: "\x1b[H\x1b[J$<200>",
70 ShowCursor: "\x1b[34h\x1b[?25h",
71 HideCursor: "\x1b[?25l",
72 AttrOff: "\x1b[m\x0f\x1b[\"q",
73 Underline: "\x1b[4m",
74 Bold: "\x1b[1m",
75 Dim: "\x1b[2m",
76 Blink: "\x1b[5m",
77 Reverse: "\x1b[7m",
78 EnterKeypad: "\x1b[?1h",
79 ExitKeypad: "\x1b[?1l",
80 PadChar: "\x00",
81 AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~",
82 EnterAcs: "\x0e",
83 ExitAcs: "\x0f",
84 EnableAcs: "\x1b)0",
85 SetCursor: "\x1b[%i%p1%d;%p2%dH",
86 CursorBack1: "\b$<1>",
87 CursorUp1: "\x1bM",
88 KeyUp: "\x1bOA",
89 KeyDown: "\x1bOB",
90 KeyRight: "\x1bOC",
91 KeyLeft: "\x1bOD",
92 KeyBackspace: "\b",
93 KeyF1: "\x1bOP",
94 KeyF2: "\x1bOQ",
95 KeyF3: "\x1bOR",
96 KeyF4: "\x1bOS",
97 KeyF5: "\x1b[M",
98 KeyF6: "\x1b[17~",
99 KeyF7: "\x1b[18~",
100 KeyF8: "\x1b[19~",
101 KeyF9: "\x1b[20~",
102 KeyF10: "\x1b[21~",
103 KeyF11: "\x1b[23~",
104 KeyF12: "\x1b[24~",
105 KeyF17: "\x1b[K",
106 KeyF18: "\x1b[31~",
107 KeyF19: "\x1b[32~",
108 KeyF20: "\x1b[33~",
109 KeyF21: "\x1b[34~",
110 KeyF22: "\x1b[35~",
111 KeyF23: "\x1b[1~",
112 KeyF24: "\x1b[2~",
113 KeyBacktab: "\x1b[z",
114 AutoMargin: true,
115 })
116 }
117
View as plain text