sourcelib/Terminal.xtl
1⍝ Terminal: the names of the colors and keys a program draws and reads
2⍝ with (QD6), a standard library built into xetal. Import it with an
3⍝ alias of your choice: "t:" u_se< "Terminal".
4⍝
5⍝ Colors are values of type Color (for []F_G and []B_G); keys are values
6⍝ of type Key, what []K_EY @ gives (a printing key carries its
7⍝ character: []K_CHAR). A misspelled name is an undefined name, and a
8⍝ Key where a Color is wanted a type error, when the program is checked.
9
10ˡBLACK ← ⎕C̲OLOR 1
11ˡRED ← ⎕C̲OLOR 2
12ˡGREEN ← ⎕C̲OLOR 3
13ˡYELLOW ← ⎕C̲OLOR 4
14ˡBLUE ← ⎕C̲OLOR 5
15ˡMAGENTA ← ⎕C̲OLOR 6
16ˡCYAN ← ⎕C̲OLOR 7
17ˡWHITE ← ⎕C̲OLOR 8
18
19ˡUP ← ⎕K̲NAMED 1
20ˡDOWN ← ⎕K̲NAMED 2
21ˡLEFT ← ⎕K̲NAMED 3
22ˡRIGHT ← ⎕K̲NAMED 4
23ˡENTER ← ⎕K̲NAMED 5
24ˡESCAPE ← ⎕K̲NAMED 6
25ˡBACKSPACE ← ⎕K̲NAMED 7
26ˡTAB ← ⎕K̲NAMED 8
27ˡDELETE ← ⎕K̲NAMED 9
28ˡHOME ← ⎕K̲NAMED 10
29ˡEND ← ⎕K̲NAMED 11