1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# https://en.wikipedia.org/wiki/ANSI_escape_code
# FoolOS built-in terminal emulator
# check "man 5 terminfo" to understand this file
# https://invisible-island.net/xterm/terminfo.html
# we want to be a vt52?
fool-term|FoolOS built-in terminal emulator,
# automargins. (line feed and carriage return when end of line is reached)
am,
# erased with CURRENT background color when using dch1 ('\Ex')
bce,
# can erase overstrikes with blanks
# eo,
# safe to move in insert mode
## mir,
# safe to move in standout mode
## msgr,
# xenl, xon,
# size
cols#80, lines#24,
# max colors and colorpairs
colors#8,
pairs#64,
# tabwidth
it#8,
# this could hold an alterntive table paiting method
# acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
# clear
clear=\Ec,
# carraige return (to x=0) (\r)
cr=\015,
# movement
# Home
home=\EH,
# back/down/forward/up
cub1=\Eb,
cud1=\Ed,
cuf1=\Ef,
cuu1=\Eu,
# cursor position %i increases so it is 1 based
# %p1%d pushes row and prints as int
# %p2%d pushes col and prints as int
cup=\E[%i%p1%d;%p2%dH,
# cup=\EY%p1%' '%+%c%p2%' '%+%c,
# clear to end of screen
ed=\EJ,
# clear to end of line
el=\EK,
# del char under cursor
dch1=\Ex,
# backspace (not echoed anyway?)
kbs=\010,
# tab
ht=\011,
# newline (\n)
nel=\012,
# scrolling text up
ind=\ED,
# scrolling text down
ri=\EM,
# arrow keys
kcub1=\E<, kcud1=\Ev,
kcuf1=\E>, kcuu1=\Ea,
# function keys (todo: kb driver..)
## kf1=\E[[A,
## kf10=\E[21~,
## kf11=\E[23~,
## kf12=\E[24~,
### kf13=\E[25~,
### kf14=\E[26~,
### kf15=\E[28~,
### kf16=\E[29~,
### kf17=\E[31~,
### kf18=\E[32~,
### kf19=\E[33~,
## kf2=\E[[B,
### kf20=\E[34~,
## kf3=\E[[C,
## kf4=\E[[D,
## kf5=\E[[E,
## kf6=\E[17~,
## kf7=\E[18~,
## kf8=\E[19~,
## kf9=\E[20~,
#colors background/foreground
setab=\E[4%p1%dm,
setaf=\E[3%p1%dm,
#set original color pair (simply white on black)
op=\E[37;40m,
|