diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-27 16:01:55 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-27 17:47:59 -0700 |
commit | 6e1eeeebfb453fa7c871869c19375ce60fbd7413 (patch) | |
tree | 539c4a3fdf1756ae79770d5c4aaf6366f1d1525e /arc/charterm/planet-docs/doc | |
parent | 8846a7f85cc04b77b2fe8a67b6d317723437b00c (diff) | |
download | mu-6e1eeeebfb453fa7c871869c19375ce60fbd7413.tar.gz |
5485 - promote SubX to top-level
Diffstat (limited to 'arc/charterm/planet-docs/doc')
-rw-r--r-- | arc/charterm/planet-docs/doc/index.html | 117 | ||||
-rw-r--r-- | arc/charterm/planet-docs/doc/racket.css | 234 | ||||
-rw-r--r-- | arc/charterm/planet-docs/doc/scribble-common.js | 153 | ||||
-rw-r--r-- | arc/charterm/planet-docs/doc/scribble-style.css | 0 | ||||
-rw-r--r-- | arc/charterm/planet-docs/doc/scribble.css | 487 |
5 files changed, 0 insertions, 991 deletions
diff --git a/arc/charterm/planet-docs/doc/index.html b/arc/charterm/planet-docs/doc/index.html deleted file mode 100644 index 79d311c9..00000000 --- a/arc/charterm/planet-docs/doc/index.html +++ /dev/null @@ -1,117 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>CharTerm: Character-cell Terminal Interface in Racket</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default" /><link rel="stylesheet" type="text/css" href="racket.css" title="default" /><link rel="stylesheet" type="text/css" href="scribble-style.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="/" class="tocviewselflink" data-pltdoc="x">Char<span class="mywbr"> </span>Term:<span class="mywbr"> </span> Character-<wbr></wbr>cell Terminal Interface in Racket</a></td></tr></table></div><div class="tocviewsublistonly" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="/#%28part._.Introduction%29" class="tocviewlink" data-pltdoc="x">Introduction</a></td></tr><tr><td align="right">2 </td><td><a href="/#%28part._.Terminal_.Diversity%29" class="tocviewlink" data-pltdoc="x">Terminal Diversity</a></td></tr><tr><td align="right">3 </td><td><a href="/#%28part._charterm_.Object%29" class="tocviewlink" data-pltdoc="x"><span class="RktSym">charterm</span><span class="RktMeta"></span> Object</a></td></tr><tr><td align="right">4 </td><td><a href="/#%28part._.Terminal_.Information%29" class="tocviewlink" data-pltdoc="x">Terminal Information</a></td></tr><tr><td align="right">5 </td><td><a href="/#%28part._.Display_.Control%29" class="tocviewlink" data-pltdoc="x">Display Control</a></td></tr><tr><td align="right">6 </td><td><a href="/#%28part._.Keyboard_.Input%29" class="tocviewlink" data-pltdoc="x">Keyboard Input</a></td></tr><tr><td align="right">7 </td><td><a href="/#%28part._.References%29" class="tocviewlink" data-pltdoc="x">References</a></td></tr><tr><td align="right">8 </td><td><a href="/#%28part._.Known_.Issues%29" class="tocviewlink" data-pltdoc="x">Known Issues</a></td></tr><tr><td align="right">9 </td><td><a href="/#%28part._.History%29" class="tocviewlink" data-pltdoc="x">History</a></td></tr><tr><td align="right">10 </td><td><a href="/#%28part._.Legal%29" class="tocviewlink" data-pltdoc="x">Legal</a></td></tr></table></div></div></div><div class="tocsub"><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">1<tt> </tt></span><a href="#(part._.Introduction)" class="tocsubseclink" data-pltdoc="x">Introduction</a></td></tr><tr><td><span class="tocsublinknumber">1.1<tt> </tt></span><a href="#(part._.Demo)" class="tocsubseclink" data-pltdoc="x">Demo</a></td></tr><tr><td><span class="tocsublinknumber">1.2<tt> </tt></span><a href="#(part._.Simple_.Example)" class="tocsubseclink" data-pltdoc="x">Simple Example</a></td></tr><tr><td><span class="tocsublinknumber">2<tt> </tt></span><a href="#(part._.Terminal_.Diversity)" class="tocsubseclink" data-pltdoc="x">Terminal Diversity</a></td></tr><tr><td><span class="tocsublinknumber">2.1<tt> </tt></span><a href="#(part._.Protocol)" class="tocsubseclink" data-pltdoc="x">Protocol</a></td></tr><tr><td><span class="tocsublinknumber">2.2<tt> </tt></span><a href="#(part._.Key_.Encoding)" class="tocsubseclink" data-pltdoc="x">Key Encoding</a></td></tr><tr><td><span class="tocsublinknumber">2.2.1<tt> </tt></span><a href="#(part._.Keylabel)" class="tocsubseclink" data-pltdoc="x">Keylabel</a></td></tr><tr><td><span class="tocsublinknumber">2.2.2<tt> </tt></span><a href="#(part._.Keycode)" class="tocsubseclink" data-pltdoc="x">Keycode</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keycode~3f))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keycode?</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.2.3<tt> </tt></span><a href="#(part._.Keyinfo)" class="tocsubseclink" data-pltdoc="x">Keyinfo</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo~3f))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyinfo?</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-keyset-id))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyinfo-<wbr></wbr>keyset-<wbr></wbr>id</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-bytelang))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyinfo-<wbr></wbr>bytelang</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-bytelist))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyinfo-<wbr></wbr>bytelist</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-keylabel))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyinfo-<wbr></wbr>keylabel</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-keycode))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyinfo-<wbr></wbr>keycode</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-all-keycodes))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyinfo-<wbr></wbr>all-<wbr></wbr>keycodes</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.2.4<tt> </tt></span><a href="#(part._.Keyset)" class="tocsubseclink" data-pltdoc="x">Keyset</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyset~3f))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyset?</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyset-id))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keyset-<wbr></wbr>id</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-ascii-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>ascii-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-dec-vt100-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>dec-<wbr></wbr>vt100-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-dec-vt220-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>dec-<wbr></wbr>vt220-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-screen-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>screen-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-linux-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>linux-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-x11r6-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>xterm-<wbr></wbr>x11r6-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-xfree86-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>xterm-<wbr></wbr>xfree86-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-new-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>xterm-<wbr></wbr>new-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-rxvt-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>rxvt-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-wyse-wy50-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>wyse-<wbr></wbr>wy50-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-televideo-925-keyset))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>televideo-<wbr></wbr>925-<wbr></wbr>keyset</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.2.5<tt> </tt></span><a href="#(part._.Keydec)" class="tocsubseclink" data-pltdoc="x">Keydec</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keydec-id))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keydec-<wbr></wbr>id</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-vt100-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>vt100-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-vt220-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>vt220-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-screen-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>screen-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-linux-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>linux-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-new-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>xterm-<wbr></wbr>new-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>xterm-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-rxvt-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>rxvt-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-wy50-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>wy50-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-tvi925-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>tvi925-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-ascii-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>ascii-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-ansi-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>ansi-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-insane-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>insane-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.3<tt> </tt></span><a href="#(part._.Termvar)" class="tocsubseclink" data-pltdoc="x">Termvar</a></td></tr><tr><td><span class="tocsublinknumber">3<tt> </tt></span><a href="#(part._charterm_.Object)" class="tocsubseclink" data-pltdoc="x"><span class="RktSym">charterm</span><span class="RktMeta"></span> Object</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm~3f))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm?</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-termvar))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>termvar</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-protocol))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>protocol</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keydec))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>keydec</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._current-charterm))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">current-<wbr></wbr>charterm</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._open-charterm))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">open-<wbr></wbr>charterm</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._close-charterm))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">close-<wbr></wbr>charterm</span></span></a></td></tr><tr><td><a href="#(form._((planet._main..rkt._(neil._charterm..plt._3._1))._with-charterm))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">with-<wbr></wbr>charterm</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4<tt> </tt></span><a href="#(part._.Terminal_.Information)" class="tocsubseclink" data-pltdoc="x">Terminal Information</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-screen-size))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>screen-<wbr></wbr>size</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5<tt> </tt></span><a href="#(part._.Display_.Control)" class="tocsubseclink" data-pltdoc="x">Display Control</a></td></tr><tr><td><span class="tocsublinknumber">5.1<tt> </tt></span><a href="#(part._.Cursor)" class="tocsubseclink" data-pltdoc="x">Cursor</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-cursor))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>cursor</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-newline))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>newline</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.2<tt> </tt></span><a href="#(part._.Displaying)" class="tocsubseclink" data-pltdoc="x">Displaying</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-display))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>display</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.3<tt> </tt></span><a href="#(part._.Video_.Attributes)" class="tocsubseclink" data-pltdoc="x">Video Attributes</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-normal))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>normal</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-inverse))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>inverse</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-underline))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>underline</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-blink))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>blink</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-bold))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>bold</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.4<tt> </tt></span><a href="#(part._.Clearing)" class="tocsubseclink" data-pltdoc="x">Clearing</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-screen))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>clear-<wbr></wbr>screen</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-line))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>clear-<wbr></wbr>line</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-line-left))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>clear-<wbr></wbr>line-<wbr></wbr>left</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-line-right))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>clear-<wbr></wbr>line-<wbr></wbr>right</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.5<tt> </tt></span><a href="#(part._.Line_.Insert_and_.Delete)" class="tocsubseclink" data-pltdoc="x">Line Insert and Delete</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-insert-line))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>insert-<wbr></wbr>line</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-delete-line))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>delete-<wbr></wbr>line</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5.5.1<tt> </tt></span><a href="#(part._.Misc__.Output)" class="tocsubseclink" data-pltdoc="x">Misc. Output</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-bell))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>bell</span></span></a></td></tr><tr><td><span class="tocsublinknumber">6<tt> </tt></span><a href="#(part._.Keyboard_.Input)" class="tocsubseclink" data-pltdoc="x">Keyboard Input</a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-byte-ready~3f))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>byte-<wbr></wbr>ready?</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-read-key))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>read-<wbr></wbr>key</span></span></a></td></tr><tr><td><a href="#(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-read-keyinfo))" class="tocsubnonseclink" data-pltdoc="x"><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-<wbr></wbr>read-<wbr></wbr>keyinfo</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7<tt> </tt></span><a href="#(part._.References)" class="tocsubseclink" data-pltdoc="x">References</a></td></tr><tr><td><span class="tocsublinknumber">8<tt> </tt></span><a href="#(part._.Known_.Issues)" class="tocsubseclink" data-pltdoc="x">Known Issues</a></td></tr><tr><td><span class="tocsublinknumber">9<tt> </tt></span><a href="#(part._.History)" class="tocsubseclink" data-pltdoc="x">History</a></td></tr><tr><td><span class="tocsublinknumber">10<tt> </tt></span><a href="#(part._.Legal)" class="tocsubseclink" data-pltdoc="x">Legal</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="versionNoNav">3:1</span></div><h2><a name="(part._.Char.Term__.Character-cell_.Terminal_.Interface_in_.Racket)"></a><a name="(mod-path._(planet._neil/charterm~3a3~3a1))"></a>CharTerm: Character-cell Terminal Interface in Racket</h2><div class="SAuthorListBox"><span class="SAuthorList"><p class="author">Neil Van Dyke</p></span></div><p><div class="SIntrapara"></div><div class="SIntrapara">License: <a href="/#%28part._.Legal%29" class="plainlink" data-pltdoc="x">LGPLv3</a> <span class="hspace"> </span> Web: <a href="http://www.neilvandyke.org/racket-charterm/" class="plainlink">http://www.neilvandyke.org/racket-charterm/</a> -</div><div class="SIntrapara"><table cellspacing="0" class="defmodule"><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="/servlets/doc-search.rkt?tag=KCgzKSAwICgpIDAgKCkgKCkgKHEgZm9ybSAoKGxpYiAicmFja2V0L3ByaXZhdGUvYmFzZS5y%0D%0Aa3QiKSByZXF1aXJlKSkp%0D%0A" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">planet</span><span class="stt"> </span><span class="RktSym">neil/charterm:3:1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></div></p><h3>1<tt> </tt><a name="(part._.Introduction)"></a>Introduction</h3><p><div class="SIntrapara">The CharTerm package provides a Racket interface for character-cell video -display terminals on Unix-like systems – such as for <a name="(idx._(gentag._0))"></a>GNU Screen and <a name="(idx._(gentag._1))"></a><span class="RktSym">tmux</span><span class="RktMeta"></span> sessions on <a name="(idx._(gentag._2))"></a>cloud servers, <a name="(idx._(gentag._3))"></a>XTerm windows on a workstation desktop, and some older hardware -terminals (even the venerable <a name="(idx._(gentag._4))"></a>DEC VT100). Currently, it implements a subset of features available on most -terminals.</div><div class="SIntrapara">This package could be used to implement a status/management console -for a Racket-based server process (perhaps run in GNU Screen or <span class="RktSym">tmux</span><span class="RktMeta"></span> on a server machine, to be detached and reattached from SSH -sessions), a lightweight user interface for a systems tool, a command-line -REPL, a text editor, creative retro uses of old equipment, and, perhaps most -importantly, a Rogue-like application.</div><div class="SIntrapara">The CharTerm package does not include any native code (such as from <a name="(idx._(gentag._5))"></a><span class="RktSym">terminfo</span><span class="RktMeta"></span>, <a name="(idx._(gentag._6))"></a><span class="RktSym">termcap</span><span class="RktMeta"></span>, <a name="(idx._(gentag._7))"></a><span class="RktSym">curses</span><span class="RktMeta"></span>, or <a name="(idx._(gentag._8))"></a><span class="RktSym">ncurses</span><span class="RktMeta"></span>) in the Racket process, -such as through the Racket FFI or C extensions, so there is less potential for -a problem involving native code to threaten the reliability or security of a -program. CharTerm is implemented in pure Racket code except for executing <span class="RktSym">/bin/stty</span><span class="RktMeta"></span> for some purposes. Specifically, <span class="RktSym">/bin/stty</span><span class="RktMeta"></span> at startup time and shutdown time, to set modes, and (for terminal -types that don’t seem to support a screen size report control sequence) when -getting screen size. Besides security and stability, lower dependence on -native code might also simplify porting to host platforms that don’t have those -native code facilities.</div></p><h4>1.1<tt> </tt><a name="(part._.Demo)"></a>Demo</h4><p><div class="SIntrapara">For a demonstration, the following command, run from a terminal, should install the CharTerm package (if not already installed), and run the demo:</div><div class="SIntrapara"><span class="hspace"> </span><span class="stt">racket -pm neil/charterm/demo</span></div><div class="SIntrapara">This demo reports what keys you pressed, while letting you edit a -text field, and while displaying a clock. The clock is updated roughly once -per second, and is not updated during heavy keyboard input, such as when typing -fast. The demo responds to changing terminal sizes, such as when an XTerm is -window is resized. It also displays the determined terminal size, and some -small tests of the <span class="RktPn">#:width</span> argument to <span class="RktSym">charterm-display</span>. Exit the demo by pressing the <span style="font-weight: bold">Esc</span> key.</div><div class="SIntrapara">Note: Although this demo includes an editable text field, as proof -of concept, the current version of CharTerm does not provide editable text fields as reusable functionality.</div></p><h4>1.2<tt> </tt><a name="(part._.Simple_.Example)"></a>Simple Example</h4><p><div class="SIntrapara">Here’s your first CharTerm program:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" class="RktBlk"><tr><td><span class="RktMeta">#lang</span><span class="hspace"> </span><span class="RktMeta"></span><a href="/servlets/doc-search.rkt?tag=KCgzKSAwICgpIDAgKCkgKCkgKHEgbW9kLXBhdGggInJhY2tldC9iYXNlIikp%0D%0A" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a><span class="RktMeta"></span></td></tr><tr><td><span class="hspace"> </span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym">require</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">planet</span><span class="hspace"> </span><span class="RktSym">neil/charterm</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym">with-charterm</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-clear-screen</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-cursor</span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-display</span><span class="hspace"> </span><span class="RktVal">"Hello, "</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-bold</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-display</span><span class="hspace"> </span><span class="RktVal">"you"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-normal</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-display</span><span class="hspace"> </span><span class="RktVal">"."</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-cursor</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-display</span><span class="hspace"> </span><span class="RktVal">"Press a key..."</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">let</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">key</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-read-key</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-cursor</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">charterm-clear-line</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">printf</span><span class="hspace"> </span><span class="RktVal">"You pressed: ~S\r\n"</span><span class="hspace"> </span><span class="RktSym">key</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Now you’re living the dream of the ’70s.</div></p><h3>2<tt> </tt><a name="(part._.Terminal_.Diversity)"></a>Terminal Diversity</h3><p><div class="SIntrapara">Like people, few terminals are exactly the same.</div><div class="SIntrapara">Some key (ha) terms (ha) used by CharTerm are:</div><div class="SIntrapara"><ul><li><p><a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> —<wbr></wbr> a string value like from the Unix-like <span class="RktSym">TERM</span><span class="RktMeta"></span> environment variable, used to determine a default <a href="/#%28tech._protocol%29" class="techoutside" data-pltdoc="x"><span class="techinside">protocol</span></a> and <a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">keydec</span></a>.</p></li><li><p><a href="/#%28tech._protocol%29" class="techoutside" data-pltdoc="x"><span class="techinside">protocol</span></a> —<wbr></wbr> how to control the display, query for information, etc.</p></li><li><p><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">keydec</span></a> —<wbr></wbr> how to decode key encodings of a particular -terminal. A keydec is constructed from one or more keysets, can produce <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a>s or <a href="/#%28tech._keyinfo%29" class="techoutside" data-pltdoc="x"><span class="techinside">keyinfo</span></a>s.</p></li><li><p><a href="/#%28tech._keyset%29" class="techoutside" data-pltdoc="x"><span class="techinside">keyset</span></a> —<wbr></wbr> a specification of encoding some of the keys in a -particular terminal, including <a href="/#%28tech._keylabel%29" class="techoutside" data-pltdoc="x"><span class="techinside">keylabel</span></a>s and <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a>s.</p></li><li><p><a href="/#%28tech._keylabel%29" class="techoutside" data-pltdoc="x"><span class="techinside">keylabel</span></a> —<wbr></wbr> a string for how a key is likely labeled on a -keyboard, such as the DEC VT100 <span style="font-weight: bold">PF1</span> key would have a keylabel <span class="RktVal">"PF1"</span> for a <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a> <span class="RktVal">'</span><span class="RktVal">f1</span>.</p></li><li><p><a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a> —<wbr></wbr> a value produced by a decoded key, -such as a character for normal printable keys, like <span class="RktVal">#\a</span> and <span class="RktVal">#\space</span>, a symbol for some recognized unprintable keys, like <span class="RktVal">'</span><span class="RktVal">escape</span> and <span class="RktVal">'</span><span class="RktVal">f1</span>, or possibly a number for unrecognized keys.</p></li><li><p><a href="/#%28tech._keyinfo%29" class="techoutside" data-pltdoc="x"><span class="techinside">keyinfo</span></a> —<wbr></wbr> an object that is used like a <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a>, except -bundles together a keycode and a <a href="/#%28tech._keylabel%29" class="techoutside" data-pltdoc="x"><span class="techinside">keylabel</span></a>, as well as alternatate keycodes and -information about how the key was decoded (e.g., from which <a href="/#%28tech._keyset%29" class="techoutside" data-pltdoc="x"><span class="techinside">keyset</span></a>).</p></li></ul></div><div class="SIntrapara">These terms are discussed in the following subsections.</div><div class="SIntrapara">CharTerm is developed with help of original documentation such as that -curated by Paul Williams at <a href="http://vt100.net/">vt100.net</a>, various commentary found on the Web, observed behavior with -modern software terminals like XTerm, various emulators for hardware terminals, -and sometimes original hardware terminals. Thanks to Mark Pearrow for -contributing a TeleVideo 950, and Paul McCabe for a Wyse S50 WinTerm.</div><div class="SIntrapara">At time of this writing, the author is looking to acquire a DEC -VT525, circa 1994, for ongoing testing.</div><div class="SIntrapara">The author welcomes feedback on useful improvements to CharTerm’s support for terminal diversity (no pun). If you have a terminal -that is sending an escape sequence not recognized by the demo, you can run the -demo with the <span class="nobreak"><span class="stt">-n</span></span> (aka <span class="nobreak"><span class="stt">--no-escape</span></span>) argument to see the exact byte sequence:</div><div class="SIntrapara"><span class="hspace"> </span><span class="stt">racket -pm- neil/charterm/demo -n</span></div><div class="SIntrapara">When <span class="nobreak"><span class="stt">-n</span></span> is used, this will be indicated by the bottom-most scrolling line, -rather than saying “<span class="stt">To quit, press </span><span style="font-weight: bold">Esc</span><span class="stt">.</span>” instead will say “<span class="stt">There is no escape from this demo.</span>” You will have to kill the process through some other means.</div></p><h4>2.1<tt> </tt><a name="(part._.Protocol)"></a>Protocol</h4><p><div class="SIntrapara">The first concept CharTerm has for distinguishing how to communicate with a terminal is what -is what is called here <a name="(tech._protocol)"></a><span style="font-style: italic">protocol</span>, which concerns everything except how keyboard keys are decoded. -The following protocols are currently implemented:</div><div class="SIntrapara"><ul><li><p><a name="(tech._ansi._protocol)"></a><span style="font-style: italic"><span class="RktSym">ansi</span><span class="RktMeta"></span> protocol</span> —<wbr></wbr> Terminals approximating [<a href="/#%28tech._ansi._x3..64%29" class="techoutside" data-pltdoc="x"><span class="techinside">ANSI X3.64</span></a>], which is most terminals in use today, including software ones -like XTerm. This protocol is the emphasis of this package; the other protocols -are for unusual situations.</p></li><li><p><a name="(tech._wyse._wy50._protocol)"></a><span style="font-style: italic"><span class="RktSym">wyse-wy50</span><span class="RktMeta"></span> protocol</span> —<wbr></wbr> Terminals compatible with the Wyse WY-50. This support is -based on [<a href="/#%28tech._wy._50._qrg%29" class="techoutside" data-pltdoc="x"><span class="techinside">WY-50-QRG</span></a>], [<a href="/#%28tech._wy._60._ug%29" class="techoutside" data-pltdoc="x"><span class="techinside">WY-60-UG</span></a>], [<a href="/#%28tech._wy60%29" class="techoutside" data-pltdoc="x"><span class="techinside">wy60</span></a>], and [<a href="/#%28tech._powerterm%29" class="techoutside" data-pltdoc="x"><span class="techinside">PowerTerm</span></a>]. Note that video attributes are not supported, due to the WY-50’s -model of having video attribute changes occupy character cells; you may wish -to run the Wyse terminal in an ANSI or VT100 mode.</p></li><li><p><a name="(tech._televideo._925._protocol)"></a><span style="font-style: italic"><span class="RktSym">televideo-925</span><span class="RktMeta"></span> protocol</span> —<wbr></wbr> Terminals compatible with the TeleVideo 925. This support is based on [<a href="/#%28tech._tvi._925._iug%29" class="techoutside" data-pltdoc="x"><span class="techinside">TVI-925-IUG</span></a>] and behavior of [<a href="/#%28tech._powerterm%29" class="techoutside" data-pltdoc="x"><span class="techinside">PowerTerm</span></a>]. Note that video attributes are not supported, due to the 925’s -model of having video attribute changes occupy character cells; you may wish to -run your TeleVideo terminal in ANSI or VT100 mode, if it has one.</p></li><li><p><a name="(tech._ascii._protocol)"></a><span style="font-style: italic"><span class="RktSym">ascii</span><span class="RktMeta"></span> protocol</span> —<wbr></wbr> Terminals that support ASCII but not much else that we know about.</p></li></ul></div></p><h4>2.2<tt> </tt><a name="(part._.Key_.Encoding)"></a>Key Encoding</h4><p><div class="SIntrapara">While most video display control, they seem to vary more by key -encoding.</div><div class="SIntrapara">The CharTerm author was motivated to increase the sophistication of its -keyboard handling after a series of revelations on the Sunday of the long -weekend in which CharTerm was initially written. The first was discovering that four of the -function keys that had been working fine in <span class="RktSym">rxvt</span><span class="RktMeta"></span> did not work in XTerm. Dave Gilbert somewhat demystified this by -pointing out that the original VT100 had only four function keys, which set -into motion an unfortunate series of bad decisions by various developers of -terminal software to be needlessly incompatible with each other. After -Googling, a horrifying 2005 Web post by Phil Gregory [<a href="/#%28tech._gregory%29" class="techoutside" data-pltdoc="x"><span class="techinside">Gregory</span></a>], which showed that key encoding among XTerm variants was even -worse than one could ever fear. Even if one already knew how much subtleties -of old terminals varied (e.g., auto-newline behavior, whether an attribute -change consumed a space, etc.), this incompatibility in newer software was -surprising. Then, on a hunch, I tried the Linux Console on a Debian Squeeze -machine, which surely is ANSI, and found, however, that it generated <span style="font-style: italic">yet different</span> byte sequences, for the first <span style="font-style: italic">five</span> (not four) function keys. Then I compared all to the [<a href="/#%28tech._ecma._48%29" class="techoutside" data-pltdoc="x"><span class="techinside">ECMA-48</span></a>] standard, which turns out to be nigh-inscrutable, so which might -help explain why everyone became so anti-social.</div><div class="SIntrapara">CharTerm now provides the abstractions of <a href="/#%28tech._keyset%29" class="techoutside" data-pltdoc="x"><span class="techinside">keysets</span></a> and <a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">keydecs</span></a> to deal with this diversity in a maintainable way.</div></p><h5>2.2.1<tt> </tt><a name="(part._.Keylabel)"></a>Keylabel</h5><p>A <a name="(tech._keylabel)"></a><span style="font-style: italic">keylabel</span> is a Racket string for how a key is likely labeled on a particular terminal’s keyboard. Different keyboards may have different keylabels for the same <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a>. For example, a VT100 has a <span style="font-weight: bold">PF1</span> key (keylabel <span class="RktVal">"PF1"</span>, keycode <span class="RktVal">'</span><span class="RktVal">f1</span>), while many other keyboards would label the key <span style="font-weight: bold">F1</span> (keylabel <span class="RktVal">"F1"</span>, keycode <span class="RktVal">'</span><span class="RktVal">f1</span>). The keylabel currently is most useful for documenting and debugging, although it could later be used when giving instructions to the user, such as knowing whether to tell the user the <span style="font-weight: bold">Return</span> key or the <span style="font-weight: bold">Enter</span> key; the <span style="font-weight: bold">Backspace</span> or the <span style="font-weight: bold">Rubout</span> key; etc.</p><h5>2.2.2<tt> </tt><a name="(part._.Keycode)"></a>Keycode</h5><p><div class="SIntrapara">A <a name="(tech._keycode)"></a><span style="font-style: italic">keycode</span> is a value representing a key read from a terminal, which can be a Racket character, symbol, or number. Keys corresponding to printable characters have keycodes as Racket characters. Some keys corresponding to special non-printable characters can have keycodes of Racket symbols, such as <span class="RktVal">'</span><span class="RktVal">return</span>, <span class="RktVal">'</span><span class="RktVal">f1</span>, <span class="RktVal">'</span><span class="RktVal">up</span>, etc.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keycode~3f))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keycode?</span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">boolean?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">any/c</span></td></tr></table></blockquote></div><div class="SIntrapara">Predicate for whether or not <span class="RktVar">x</span> is a valid keycode.</div></p><h5>2.2.3<tt> </tt><a name="(part._.Keyinfo)"></a>Keyinfo</h5><p><div class="SIntrapara">A <a name="(tech._keyinfo)"></a><span style="font-style: italic">keyinfo</span> represents a <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a> for a key, a <a href="/#%28tech._keylabel%29" class="techoutside" data-pltdoc="x"><span class="techinside">keylabel</span></a>, and how it is encoded as bytes. It is represented in Racket as -a <span class="RktSym">charterm-keyinfo</span> object.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo~3f))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyinfo?</span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">boolean?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">any/c</span></td></tr></table></blockquote></div><div class="SIntrapara">Predicate for whether or not <span class="RktSym">x</span> is a <span class="RktSym">charterm-keyinfo</span> object.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-keyset-id))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyinfo-keyset-id</span></span><span class="hspace"> </span><span class="RktVar">ki</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">symbol?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ki</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyinfo?</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-bytelang))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyinfo-bytelang</span></span><span class="hspace"> </span><span class="RktVar">ki</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">string?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ki</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyinfo?</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-bytelist))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyinfo-bytelist</span></span><span class="hspace"> </span><span class="RktVar">ki</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">listof</span><span class="hspace"> </span><span class="RktSym">byte?</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ki</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyinfo?</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-keylabel))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyinfo-keylabel</span></span><span class="hspace"> </span><span class="RktVar">ki</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">string?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ki</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyinfo?</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-keycode))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyinfo-keycode</span></span><span class="hspace"> </span><span class="RktVar">ki</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">charterm-keycode?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ki</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyinfo?</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyinfo-all-keycodes))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyinfo-all-keycodes</span></span><span class="hspace"> </span><span class="RktVar">ki</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">listof</span><span class="hspace"> </span><span class="RktSym">charterm-keycode?</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ki</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyinfo?</span></td></tr></table></blockquote></div><div class="SIntrapara">Get information from a <span class="RktSym">charterm-keyinfo</span> object.</div></p><h5>2.2.4<tt> </tt><a name="(part._.Keyset)"></a>Keyset</h5><p><div class="SIntrapara">A <a name="(tech._keyset)"></a><span style="font-style: italic">keyset</span> is a specification of keys on a particular keyboard, including their <a href="/#%28tech._keylabel%29" class="techoutside" data-pltdoc="x"><span class="techinside">keylabel</span></a>, encoding as bytes, and primary and alternate <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycodes</span></a>.</div><div class="SIntrapara">The means of constructing a keyset is currently internal to this package.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyset~3f))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyset?</span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">boolean?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">any/c</span></td></tr></table></blockquote></div><div class="SIntrapara">Predicate for whether or not <span class="RktVar">x</span> is a keyset.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keyset-id))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keyset-id</span></span><span class="hspace"> </span><span class="RktVar">ks</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">symbol?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ks</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></td></tr></table></blockquote></div><div class="SIntrapara">Get a symbol identifying the keyset.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-ascii-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-ascii-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the old [<a href="/#%28tech._ascii%29" class="techoutside" data-pltdoc="x"><span class="techinside">ASCII</span></a>] standard. When defining a <a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">keydec</span></a>, this is good to have as a final keyset, after the others.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-dec-vt100-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-dec-vt100-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the DEC VT100. This currently defines the four function -keys (labeled on the keyboard, <span style="font-weight: bold">PF1</span> through <span style="font-weight: bold">PF4</span>) as <span class="RktVal">'</span><span class="RktVal">f1</span> through <span class="RktVal">'</span><span class="RktVal">f4</span>, and the arrow keys. [<a href="/#%28tech._vt100._ug%29" class="techoutside" data-pltdoc="x"><span class="techinside">VT100-UG</span></a>] and [<a href="/#%28tech._powerterm%29" class="techoutside" data-pltdoc="x"><span class="techinside">PowerTerm</span></a>] were used as references.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-dec-vt220-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-dec-vt220-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the DEC VT220. This currently defines function keys <span style="font-weight: bold">F1</span> through <span style="font-weight: bold">F20</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-screen-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-screen-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the <a href="http://en.wikipedia.org/wiki/GNU_Screen">GNU Screen</a> terminal multiplexer, according to [<a href="/#%28tech._gregory%29" class="techoutside" data-pltdoc="x"><span class="techinside">Gregory</span></a>]. Also used by <a href="http://en.wikipedia.org/wiki/Tmux"><span class="RktSym">tmux</span><span class="RktMeta"></span></a>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-linux-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-linux-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the Linux console. Currently defines function keys <span style="font-weight: bold">F1</span> through <span style="font-weight: bold">F5</span> only, since the rest will be inherited from other keysets.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-x11r6-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-xterm-x11r6-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the XTerm in X11R6, according to [<a href="/#%28tech._gregory%29" class="techoutside" data-pltdoc="x"><span class="techinside">Gregory</span></a>].</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-xfree86-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-xterm-xfree86-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the XFree86 XTerm, according to [<a href="/#%28tech._gregory%29" class="techoutside" data-pltdoc="x"><span class="techinside">Gregory</span></a>].</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-new-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-xterm-new-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the current <span class="RktSym">xterm-new</span><span class="RktMeta"></span>, often called simply <span class="RktSym">xterm</span><span class="RktMeta"></span>, as developed by Thomas E. Dickey, and documented in [<a href="/#%28tech._xterm._ctlseq%29" class="techoutside" data-pltdoc="x"><span class="techinside">XTerm-ctlseqs</span></a>]. Several also came from decompiling a <span class="RktSym">terminfo</span><span class="RktMeta"></span> entry. Thanks to Dickey for his emailed help.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-rxvt-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-rxvt-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the <a href="http://en.wikipedia.org/wiki/Rxvt"><span class="RktSym">rxvt</span><span class="RktMeta"></span></a> terminal emulator. These come from [<a href="/#%28tech._gregory%29" class="techoutside" data-pltdoc="x"><span class="techinside">Gregory</span></a>], and -currently define function keys <span class="RktVal">'</span><span class="RktVal">f1</span> through <span class="RktVal">'</span><span class="RktVal">f44</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-wyse-wy50-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-wyse-wy50-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the Wyse WY-50, based on [<a href="/#%28tech._wy._50._qrg%29" class="techoutside" data-pltdoc="x"><span class="techinside">WY-50-QRG</span></a>] and looking at photos of WY-50 keyboard, and tested in [<a href="/#%28tech._wy60%29" class="techoutside" data-pltdoc="x"><span class="techinside">wy60</span></a>] and [<a href="/#%28tech._powerterm%29" class="techoutside" data-pltdoc="x"><span class="techinside">PowerTerm</span></a>]. The shifted function keys are provided as both <span class="RktVal">'</span><span class="RktVal">shift-f1</span> through <span class="RktVal">'</span><span class="RktVal">shift-16</span>, and <span class="RktVal">'</span><span class="RktVal">f17</span> through <span class="RktVal">'</span><span class="RktVal">f31</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-televideo-925-keyset))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-televideo-925-keyset</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keyset?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">From the TeleVideo 925, based on [<a href="/#%28tech._tvi._925._iug%29" class="techoutside" data-pltdoc="x"><span class="techinside">TVI-925-IUG</span></a>], [<a href="/#%28tech._powerterm%29" class="techoutside" data-pltdoc="x"><span class="techinside">PowerTerm</span></a>], and from looking at a TeleVideo 950 keyboard.</div></p><h5>2.2.5<tt> </tt><a name="(part._.Keydec)"></a>Keydec</h5><p><div class="SIntrapara">A <a name="(tech._keydec)"></a><span style="font-style: italic">keydec</span> object is a key decoder for a specific variety of terminal, such -as for a specific <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a>. A keydec is used to turn received key encodings from a terminal into <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a> or <a href="/#%28tech._keyinfo%29" class="techoutside" data-pltdoc="x"><span class="techinside">keyinfo</span></a> values. A keydec is constructed from a prioritized list of <a href="/#%28tech._keyset%29" class="techoutside" data-pltdoc="x"><span class="techinside">keyset</span></a> objects, with earlier-listed keysets taking priority of -later-listed keysets when there is conflict between them as to how to decode a -particular byte sequence.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keydec-id))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keydec-id</span></span><span class="hspace"> </span><span class="RktVar">kd</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">symbol?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">kd</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></td></tr></table></blockquote></div><div class="SIntrapara">Gets the ID symbol of the <a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">keydec</span></a> being used.</div><div class="SIntrapara"><span class="SSubSubSubSection">ANSI Keydecs</span></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-vt100-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-vt100-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"vt100"</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-vt220-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-vt220-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"vt220"</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-screen-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-screen-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"screen"</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-linux-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-linux-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"linux"</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-new-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-xterm-new-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"xterm-new"</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-xterm-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-xterm-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"xterm"</span>. Currently same as the keydec for <span class="RktSym">xterm</span><span class="RktMeta"></span>, except for a different ID.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-rxvt-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-rxvt-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"rxvt"</span>.</div><div class="SIntrapara"><span class="SSubSubSubSection">Wyse Keydecs</span></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-wy50-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-wy50-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"wy50"</span>.</div><div class="SIntrapara"><span class="SSubSubSubSection">TeleVideo Keydecs</span></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-tvi925-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-tvi925-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"tvi925"</span>.</div><div class="SIntrapara"><span class="SSubSubSubSection">ASCII Keydecs</span></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-ascii-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-ascii-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktVal">"ascii"</span>.</div><div class="SIntrapara"><span class="SSubSubSubSection">Default Keydecs</span></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-ansi-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-ansi-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for any presumed ANSI-ish terminal, combining many ANSI-ish <a href="/#%28tech._keyset%29" class="techoutside" data-pltdoc="x"><span class="techinside">keysets</span></a>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-insane-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-insane-keydec</span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm-keydec?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">Keydec</span></a> for the uniquely desperate situation of wanting to possibly have -extensive key decoding for a terminal that might not even be ansi, but be -Wyse, TeleVideo, or some other ASCII.</div></p><h4>2.3<tt> </tt><a name="(part._.Termvar)"></a>Termvar</h4><p>A <a name="(tech._termvar)"></a><span style="font-style: italic">termvar</span> is what the <span class="RktSym">charterm</span><span class="RktMeta"></span> package calls the value of the Unix-like <span class="RktSym">TERM</span><span class="RktMeta"></span> environment variable. Each <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> has a default <a href="/#%28tech._protocol%29" class="techoutside" data-pltdoc="x"><span class="techinside">protocol</span></a> and <a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">keydec</span></a>. Note, however, that <span class="RktSym">TERM</span><span class="RktMeta"></span> is not always a precise indicator of the best protocol and keydec, -but by default we work with what we have.</p><h3>3<tt> </tt><a name="(part._charterm_.Object)"></a><span class="RktSym">charterm</span><span class="RktMeta"></span> Object</h3><p><div class="SIntrapara">The <span class="RktSym">charterm</span> object captures the state of a session with a particular terminal.</div><div class="SIntrapara">A <span class="RktSym">charterm</span> object is also a synchronizable event, so it can be used with -procedures such as <span class="RktSym">sync</span>. As an event, it becomes ready when there is at least one byte -available for reading from the terminal, and its synchronization result is -itself.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm~3f))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm?</span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">boolean?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">any/c</span></td></tr></table></blockquote></div><div class="SIntrapara">Predicate for whether or not <span class="RktVar">x</span> is a <span class="RktSym">charterm</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-termvar))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-termvar</span></span><span class="hspace"> </span><span class="RktVar">ct</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">string?</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span></td></tr></table></blockquote></div><div class="SIntrapara">Gets the <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-protocol))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-protocol</span></span><span class="hspace"> </span><span class="RktVar">ct</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">symbol?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span></td></tr></table></blockquote></div><div class="SIntrapara">Gets the <a href="/#%28tech._protocol%29" class="techoutside" data-pltdoc="x"><span class="techinside">protocol</span></a>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-keydec))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-keydec</span></span><span class="hspace"> </span><span class="RktVar">ct</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">symbol?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span></td></tr></table></blockquote></div><div class="SIntrapara">Gets the <a href="/#%28tech._keydec%29" class="techoutside" data-pltdoc="x"><span class="techinside">keydec</span></a>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._current-charterm))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">current-charterm</span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">charterm?</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">current-charterm</span></span><span class="hspace"> </span><span class="RktVar">ct</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="/servlets/doc-search.rkt?tag=KCgzKSAwICgpIDAgKCkgKCkgKHEgZGVmICgocXVvdGUgIyVrZXJuZWwpIHZvaWQ%2FKSkp%0D%0A" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">charterm?</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">This parameter provides the default <span class="RktSym">charterm</span> for most of the other procedures. It is usually set automatically by <span class="RktSym">call-with-charterm</span>, <span class="RktSym">with-charterm</span>, <span class="RktSym">open-charterm</span>, and <span class="RktSym">close-charterm</span>.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._open-charterm))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">open-charterm</span></span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:tty</span><span class="hspace"> </span><span class="RktVar">tty</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:current?</span><span class="hspace"> </span><span class="RktVar">current?</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym">charterm?</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">tty</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">path-string?</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">current?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">boolean?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an open <span class="RktSym">charterm</span> object, by opening I/O ports on the terminal device at <span class="RktVar">tty</span> (or, if <span class="RktVal">#f</span>, file <span class="stt">"/dev/tty"</span>), and setting raw mode and disabling echo (via <span class="stt">"/bin/stty"</span>). If <span class="RktVar">current?</span> is true, the <span class="RktSym">current-charterm</span> parameter is also set to this object.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._close-charterm))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">close-charterm</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Closes <span class="RktVar">ct</span> by closing the I/O ports, and undoing <span class="RktSym">open-charterm</span>’s changes via <span class="stt">"/bin/stty"</span>. If <span class="RktSym">current-charterm</span> is set to <span class="RktVar">ct</span>, then that parameter will be changed to <span class="RktVal">#f</span> for good measure. You might wish to use <span class="RktSym">with-charterm</span> instead of worrying about calling <span class="RktSym">close-charterm</span> directly.</div><div class="SIntrapara">Note: If you exit your Racket process without properly closing the <span class="RktSym">charterm</span>, your terminal may be left in a crazy state. You can fix it with -the command:</div><div class="SIntrapara"><span class="hspace"> </span><span class="stt">stty sane</span></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((planet._main..rkt._(neil._charterm..plt._3._1))._with-charterm))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">with-charterm</span></span><span class="hspace"> </span><span class="RktVar">expr?</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Opens a <span class="RktSym">charterm</span> and evaluates the body expressions in sequence with <span class="RktSym">current-charterm</span> set appropriately. When control jumps out of the body, in a -manner of speaking, the <span class="RktSym">charterm</span> is closed.</div></p><h3>4<tt> </tt><a name="(part._.Terminal_.Information)"></a>Terminal Information</h3><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-screen-size))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-screen-size</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" class="prototype"><tr><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0"><tr><td><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">exact-nonnegative-integer?</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">exact-nonnegative-integer?</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Attempts to get the screen size, in character columns and rows. -It may do this through a control sequence or through <span class="RktSym">/bin/stty</span><span class="RktMeta"></span>. If unable to get a value, then default of (80,24) is used.</div><div class="SIntrapara">The current behavior in this version of <span class="RktSym">charterm</span><span class="RktMeta"></span> is to adaptively try different methods of getting screen size, -and to remember what worked for the next time this procedure is called for <span class="RktVar">ct</span>. For terminals that are identified as <span class="RktSym">screen</span><span class="RktMeta"></span> by the <span class="RktSym">TERM</span><span class="RktMeta"></span> environment variable (e.g., terminal emulators like GNU Screen -and <span class="RktSym">tmux</span><span class="RktMeta"></span>), the current behavior is to not try the control sequence (which -causes a 1-second delay waiting for a terminal response that never arrives), -and to just use <span class="RktSym">stty</span><span class="RktMeta"></span>. For all other terminals, the control sequence is tried first, before trying <span class="RktSym">stty</span><span class="RktMeta"></span>. If neither the control sequence nor <span class="RktSym">stty</span><span class="RktMeta"></span> work, then neither method is tried again for <span class="RktVar">ct</span>, and instead the procedure always returns (<span class="RktVal">#f</span>, <span class="RktVal">#f</span>). This behavior very well might change in future versions of <span class="RktSym">charterm</span><span class="RktMeta"></span>, and the author welcomes feedback on which methods work with -which terminals.</div></p><h3>5<tt> </tt><a name="(part._.Display_.Control)"></a>Display Control</h3><h4>5.1<tt> </tt><a name="(part._.Cursor)"></a>Cursor</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-cursor))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-cursor</span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span><span class="RktVar">y</span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">exact-positive-integer?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">y</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">exact-positive-integer?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Positions the cursor at column <span class="RktVar">x</span>, row <span class="RktVar">y</span>, with the upper-left character cell being (1, 1).</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-newline))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-newline</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Sends a newline to the terminal. This is typically a CR-LF -sequence.</div></p><h4>5.2<tt> </tt><a name="(part._.Displaying)"></a>Displaying</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-display))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-display</span></span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:width</span><span class="hspace"> </span><span class="RktVar">width</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:pad</span><span class="hspace"> </span><span class="RktVar">pad</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:truncate</span><span class="hspace"> </span><span class="RktVar">truncate</span>]</td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym">void?</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">width</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">exact-positive-integer?</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pad</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">width</span><span class="hspace"> </span><span class="RktSym">boolean?</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">width</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">truncate</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">width</span><span class="hspace"> </span><span class="RktSym">boolean?</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">width</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">any/c</span></td></tr></table></blockquote></div><div class="SIntrapara">Displays each <span class="RktVar">arg</span> on the terminal, as if formatted by <span class="RktSym">display</span>, with the exception that unprintable or non-ASCII characters -might not be displayed. (The exact behavior of what is permitted is expected -to change in a later version of CharTerm, so avoid trying to send your own control sequences or using -newlines, making assumptions about non-ASCII characters, etc.)</div><div class="SIntrapara">If <span class="RktVar">width</span> is a number, then <span class="RktVar">pad</span> and <span class="RktVar">truncate</span> specify whether or not to pad with spaces or truncate the output, respectively, to <span class="RktVar">width</span> characters. When <span class="RktVar">pad</span> or <span class="RktVar">width</span> is <span class="RktVal">'</span><span class="RktVal">width</span>, that is a convenience meaning “true if, and only if, <span class="RktVar">width</span> is not <span class="RktVal">#f</span>.”</div></p><h4>5.3<tt> </tt><a name="(part._.Video_.Attributes)"></a>Video Attributes</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-normal))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-normal</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-inverse))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-inverse</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-underline))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-underline</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-blink))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-blink</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-bold))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-bold</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Sets the <a name="(tech._video._attribute)"></a><span style="font-style: italic">video attributes</span> for subsequent writes to the terminal. In this version of <span class="RktSym">charterm</span><span class="RktMeta"></span>, each is mutually-exclusive, so, for example, setting <span style="font-style: italic">bold</span> clears <span style="font-style: italic">inverse</span>. Note that that video attributes are currently supported only for protocol <span class="RktVal">'</span><span class="RktVal">ansi</span>, due to limitations of the TeleVideo and Wyse models for -video attributes.</div></p><h4>5.4<tt> </tt><a name="(part._.Clearing)"></a>Clearing</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-screen))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-clear-screen</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Clears the screen, including first setting the video attributes to -normal, and positioning the cursor at (1, 1).</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-line))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-clear-line</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-line-left))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-clear-line-left</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-clear-line-right))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-clear-line-right</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Clears text from the line with the cursor, or part of the line with the cursor.</div></p><h4>5.5<tt> </tt><a name="(part._.Line_.Insert_and_.Delete)"></a>Line Insert and Delete</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-insert-line))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-insert-line</span></span><span class="hspace"> </span>[<span class="RktVar">count</span><span class="hspace"> </span><span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">count</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">exact-positive-integer?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">1</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Inserts <span class="RktVar">count</span> blank lines at cursor. Note that not all terminals support -this.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-delete-line))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-delete-line</span></span><span class="hspace"> </span>[<span class="RktVar">count</span><span class="hspace"> </span><span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">count</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">exact-positive-integer?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">1</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Deletes <span class="RktVar">count</span> blank lines at cursor. Note that not all terminals support -this.</div></p><h5>5.5.1<tt> </tt><a name="(part._.Misc__.Output)"></a>Misc. Output</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-bell))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-bell</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">void?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Rings the terminal bell. This bell ringing might manifest as a -beep, a flash of the screen, or nothing.</div></p><h3>6<tt> </tt><a name="(part._.Keyboard_.Input)"></a>Keyboard Input</h3><p><div class="SIntrapara">Normally you will get keyboard input using the <span class="RktSym">charterm-read-key</span> procedure.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-byte-ready~3f))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-byte-ready?</span></span><span class="hspace"> </span>[<span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">boolean?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns true/false for whether at least one byte is ready for -reading (either in a buffer or on the port) from <span class="RktVar">ct</span>. Note that, since some keys are encoded as multiple bytes, just -because this procedure returns true doesn’t mean that <span class="RktSym">charterm-read-key</span> won’t block temporarily because it sees part of a potential -multiple-byte key encoding.</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-read-key))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-read-key</span></span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:timeout</span><span class="hspace"> </span><span class="RktVar">timeout</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym">or</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">char?</span><span class="hspace"> </span><span class="RktSym">symbol?</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">timeout</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">positive?</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Reads a key from <span class="RktVar">ct</span>, blocking indefinitely or until sometime after <span class="RktVar">timeout</span> seconds has been reached, if <span class="RktVar">timeout</span> is non-<span class="RktVal">#f</span>. If timeout is reached, <span class="RktVal">#f</span> is returned.</div><div class="SIntrapara">Many keys are returned as characters, especially ones that -correspond to printable characters. For example, the unshifted <span style="font-weight: bold">Q</span> key is returned as character <span class="RktVal">#\q</span>. Some other keys are returned as symbols, such as <span class="RktVal">'</span><span class="RktVal">return</span>, <span class="RktVal">'</span><span class="RktVal">escape</span>, <span class="RktVal">'</span><span class="RktVal">f1</span>, <span class="RktVal">'</span><span class="RktVal">shift-f12</span>, <span class="RktVal">'</span><span class="RktVal">right</span>, and many others.</div><div class="SIntrapara">Since some keys are sent as ambiguous sequences, <span class="RktSym">charterm-read-key</span> employs separate timeouts internally, such as to disambuate -the <span style="font-weight: bold">Esc</span> key (byte sequence 27) from what on some terminals would be -the <span style="font-weight: bold">F10</span> key (bytes sequence 27, 91, 50, 49, 126).</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((planet._main..rkt._(neil._charterm..plt._3._1))._charterm-read-keyinfo))"></a><span title="Provided from: (planet neil/charterm:3:1)"><span class="RktSym">charterm-read-keyinfo</span></span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:charterm</span><span class="hspace"> </span><span class="RktVar">ct</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:timeout</span><span class="hspace"> </span><span class="RktVar">timeout</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym">charterm-keyinfo?</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ct</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">charterm?</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">current-charterm</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">timeout</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym">positive?</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym">charterm-read-keyinfo</span> except instead of returning a <a href="/#%28tech._keycode%29" class="techoutside" data-pltdoc="x"><span class="techinside">keycode</span></a>, it returns a <a href="/#%28tech._keyinfo%29" class="techoutside" data-pltdoc="x"><span class="techinside">keyinfo</span></a>.</div></p><h3>7<tt> </tt><a name="(part._.References)"></a>References</h3><p><div class="SIntrapara">[<a name="(tech._ansi._x3..64)"></a><span style="font-style: italic">ANSI X3.64</span>] <a href="http://en.wikipedia.org/wiki/ANSI_escape_code"><span class="url">http://en.wikipedia.org/wiki/ANSI_escape_code</span></a></div><div class="SIntrapara">[<a name="(tech._ascii)"></a><span style="font-style: italic">ASCII</span>] <a href="http://en.wikipedia.org/wiki/Ascii"><span class="url">http://en.wikipedia.org/wiki/Ascii</span></a></div><div class="SIntrapara">[<a name="(tech._ecma._43)"></a><span style="font-style: italic">ECMA-43</span>] <a href="http://www.ecma-international.org/publications/standards/Ecma-043.htm"><span style="font-style: italic">Standard ECMA-43: 8-bit Coded Character Set Structure and Rules</span></a>, 3rd Ed., 1991-12</div><div class="SIntrapara">[<a name="(tech._ecma._48)"></a><span style="font-style: italic">ECMA-48</span>] <a href="http://www.ecma-international.org/publications/standards/Ecma-048.htm"><span style="font-style: italic">Standard ECMA-48: Control Functions for Coded Character Sets</span></a>, 5th Ed., 1991-06</div><div class="SIntrapara">[<a name="(tech._gregory)"></a><span style="font-style: italic">Gregory</span>] Phil Gregory, “<a href="http://aperiodic.net/phil/archives/Geekery/term-function-keys.html">Terminal Function Key Escape Codes</a>,” 2005-12-13 Web post, as viewed on 2012-06</div><div class="SIntrapara">[<a name="(tech._powerterm)"></a><span style="font-style: italic">PowerTerm</span>] Ericom PowerTerm InterConnect 8.2.0.1000 terminal emulator, as run on Wyse S50 WinTerm</div><div class="SIntrapara">[<a name="(tech._tvi._925._iug)"></a><span style="font-style: italic">TVI-925-IUG</span>] <a href="http://vt100.net/televideo/tvi925_ig.pdf"><span style="font-style: italic">TeleVideo Model 925 CRT Terminal Installation and User’s Guide</span></a></div><div class="SIntrapara">[<a name="(tech._tvi._950._om)"></a><span style="font-style: italic">TVI-950-OM</span>] <a href="http://www.mirrorservice.org/sites/www.bitsavers.org/pdf/televideo/Operators_Manual_Model_950_1981.pdf"><span style="font-style: italic">TeleVideo Operator’s Manual Model 950</span></a>, 1981</div><div class="SIntrapara">[<a name="(tech._vt100._tm)"></a><span style="font-style: italic">VT100-TM</span>] Digital Equipment Corp., <a href="http://vt100.net/docs/vt100-tm/"><span style="font-style: italic">VT100 Series Technical Manual</span></a>, 2nd Ed., 1980-09</div><div class="SIntrapara">[<a name="(tech._vt100._ug)"></a><span style="font-style: italic">VT100-UG</span>] Digital Equipment Corp., <a href="http://vt100.net/docs/vt100-ug/"><span style="font-style: italic">VT100 User Guide</span></a>, 3rd Ed., 1981-06</div><div class="SIntrapara">[<a name="(tech._vt100._wp)"></a><span style="font-style: italic">VT100-WP</span>] Wikipedia, <a href="http://en.wikipedia.org/wiki/VT100">VT100</a></div><div class="SIntrapara">[<a name="(tech._wy._50._qrg)"></a><span style="font-style: italic">WY-50-QRG</span>] <a href="http://vt100.net/wyse/wy-50-qrg/wy-50-qrg.pdf"><span style="font-style: italic">Wyse WY-50 Display Terminal Quick-Reference Guide</span></a></div><div class="SIntrapara">[<a name="(tech._wy._60._ug)"></a><span style="font-style: italic">WY-60-UG</span>] <a href="http://vt100.net/wyse/wy-60-ug/wy-60-ug.pdf"><span style="font-style: italic">Wyse WY-60 User’s Guide</span></a></div><div class="SIntrapara">[<a name="(tech._wy60)"></a><span style="font-style: italic">wy60</span>] <a href="http://code.google.com/p/wy60/"><span class="RktSym">wy60</span><span class="RktMeta"></span> terminal emulator</a></div><div class="SIntrapara">[<a name="(tech._xterm._ctlseq)"></a><span style="font-style: italic">XTerm-ctlseqs</span>] Edward Moy, Stephen Gildea, Thomas Dickey, “<a href="http://invisible-island.net/xterm/ctlseqs/ctlseqs.html">Xterm Control Sequences</a>,” 2012</div><div class="SIntrapara">[<a name="(tech._xterm._dickey)"></a><span style="font-style: italic">XTerm-Dickey</span>] <a href="http://invisible-island.net/xterm/"><span class="url">http://invisible-island.net/xterm/</span></a></div><div class="SIntrapara">[<a name="(tech._xterm._faq)"></a><span style="font-style: italic">XTerm-FAQ</span>] Thomas E. Dickey, “<a href="http://invisible-island.net/xterm/xterm.faq.html">XTerm FAQ</a>,” dated 2012</div><div class="SIntrapara">[<a name="(tech._xterm._wp)"></a><span style="font-style: italic">XTerm-WP</span>] Wikipedia, <a href="http://en.wikipedia.org/wiki/Xterm">xterm</a></div></p><h3>8<tt> </tt><a name="(part._.Known_.Issues)"></a>Known Issues</h3><ul><li><p>Need to support ANSI alternate CSI for 8-bit terminals, even -before supporting 8-bit characters and multibyte.</p></li><li><p>Only supports ASCII characters. Adding UTF-8 support, for terminal emulators -that support it, would be nice.</p></li><li><p>Expose the character-decoding mini-language as a configurable -option. Perhaps wait until we implement timeout-based disambiguation at -arbitrary points in the the DFA rather than just at the top. Also, might be -better to resolve multi-byte characters first, in case that affects the -mini-language.</p></li><li><p>More controls for terminal features can be added.</p></li><li><p>Currently only implemented to work on Unix-like systems like -GNU/Linux.</p></li><li><p>Implement text input controls, either as part of this library or -another, using <span class="RktSym">charterm-demo</span> as a starting point.</p></li></ul><h3>9<tt> </tt><a name="(part._.History)"></a>History</h3><ul><li><p><div class="SIntrapara">PLaneT 3:1 —<wbr></wbr> 2013-05-13</div><div class="SIntrapara"><ul><li><p>Now uses lowercase <span class="RktSym"><span class="nobreak">-f</span></span><span class="RktMeta"></span> argument on MacOS X. (Thanks to Jens Axel Søgaard for reporting.)</p></li><li><p>Documentation tweaks.</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 3:0 —<wbr></wbr> 2012-07-13</div><div class="SIntrapara"><ul><li><p>Changed “<span class="RktSym">ansi-ish</span><span class="RktMeta"></span>” in identifiers to “<span class="RktSym">ansi</span><span class="RktMeta"></span>”, hence the PLaneT major version number change.</p></li><li><p>Documentation tweaks.</p></li><li><p>Renamed package from “<span class="RktSym">charterm</span><span class="RktMeta"></span>” to “CharTerm”.</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 2:5 —<wbr></wbr> 2012-06-28</div><div class="SIntrapara"><ul><li><p>A <span class="RktSym">charterm</span> object is now a synchronizable event.</p></li><li><p>Documentation tweaks.</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 2:4 —<wbr></wbr> 2012-06-25</div><div class="SIntrapara"><ul><li><p>Documentation fix for return type of <span class="RktSym">charterm-read-keyinfo</span>.</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 2:3 —<wbr></wbr> 2012-06-25</div><div class="SIntrapara"><ul><li><p>Fixed problem determining screen size on some -XTerms. (Thanks to Eli Barzilay for reporting.)</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 2:2 —<wbr></wbr> 2012-06-25</div><div class="SIntrapara"><ul><li><p>Added another variation of encoding for XTerm arrow, -Home, and End keys. (Thanks to Eli Barzilay.)</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 2:1 —<wbr></wbr> 2012-06-24</div><div class="SIntrapara"><ul><li><p>Corrected PLaneT version number in <span class="RktSym">require</span> in an example.</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 2:0 —<wbr></wbr> 2012-06-24</div><div class="SIntrapara"><ul><li><p>Greatly increased the sophistication of handling of terminal diversity.</p></li><li><p>Added the <span class="RktSym">wyse-wy50</span><span class="RktMeta"></span> and <span class="RktSym">televideo-950</span><span class="RktMeta"></span> [Correction: <span class="RktSym">televideo-925</span><span class="RktMeta"></span>] protocols, for supporting the native modes of Wyse and -TeleVideo terminals, respectively, and compatibles.</p></li><li><p>More support for different key encodings and termvars.</p></li><li><p>Demo is now in a separate file, mainly for convenience -in giving command lines that run it. This breaks a command line example -previously documented, so changed PLaneT major version, although the -previously-published example will need to have <span class="RktSym">:1</span><span class="RktMeta"></span> added to it anyway.</p></li><li><p><span class="RktSym">charterm-screen-size</span> now defaults to (80,24) when all else fails.</p></li><li><p>Documentation changes.</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 1:1 —<wbr></wbr> 2012-06-17</div><div class="SIntrapara"><ul><li><p>For <span class="RktSym">screen</span><span class="RktMeta"></span> and <span class="RktSym">tmux</span><span class="RktMeta"></span>, now gets screen size via <span class="RktSym">stty</span><span class="RktMeta"></span>. This resolves the sluggishness reported with <span class="RktSym">screen</span><span class="RktMeta"></span>. [Correction: In version 1:1, this behavior is -adaptive for all terminals, with the shortcut for <a href="/#%28tech._termvar%29" class="techoutside" data-pltdoc="x"><span class="techinside">termvar</span></a> <span class="RktSym">screen</span><span class="RktMeta"></span> that it doesn’t bother trying the control sequence.]</p></li><li><p>Documentation tweaks.</p></li></ul></div></p></li><li><p><div class="SIntrapara">PLaneT 1:0 —<wbr></wbr> 2012-06-16</div><div class="SIntrapara"><ul><li><p>Initial version.</p></li></ul></div></p></li></ul><h3>10<tt> </tt><a name="(part._.Legal)"></a>Legal</h3><p>Copyright 2012 – 2013 Neil Van Dyke. This program is Free Software; you -can redistribute it and/or modify it under the terms of the GNU Lesser General -Public License as published by the Free Software Foundation; either version 3 -of the License, or (at your option) any later version. This program is -distributed in the hope that it will be useful, but without any warranty; -without even the implied warranty of merchantability or fitness for a -particular purpose. See http://www.gnu.org/licenses/ for details. For other -licenses and consulting, please contact the author.</p></div></div><div id="contextindicator"> </div></body></html> \ No newline at end of file diff --git a/arc/charterm/planet-docs/doc/racket.css b/arc/charterm/planet-docs/doc/racket.css deleted file mode 100644 index 021e4da5..00000000 --- a/arc/charterm/planet-docs/doc/racket.css +++ /dev/null @@ -1,234 +0,0 @@ - -/* See the beginning of "scribble.css". */ - -/* Monospace: */ -.RktIn, .RktRdr, .RktPn, .RktMeta, -.RktMod, .RktKw, .RktVar, .RktSym, -.RktRes, .RktOut, .RktCmt, .RktVal, -.RktBlk { - font-family: monospace; - white-space: inherit; -} - -/* Serif: */ -.inheritedlbl { - font-family: serif; -} - -/* Sans-serif: */ -.RBackgroundLabelInner { - font-family: sans-serif; -} - -/* ---------------------------------------- */ -/* Inherited methods, left margin */ - -.inherited { - width: 100%; - margin-top: 0.5em; - text-align: left; - background-color: #ECF5F5; -} - -.inherited td { - font-size: 82%; - padding-left: 1em; - text-indent: -0.8em; - padding-right: 0.2em; -} - -.inheritedlbl { - font-style: italic; -} - -/* ---------------------------------------- */ -/* Racket text styles */ - -.RktIn { - color: #cc6633; - background-color: #eeeeee; -} - -.RktInBG { - background-color: #eeeeee; -} - -.RktRdr { -} - -.RktPn { - color: #843c24; -} - -.RktMeta { - color: black; -} - -.RktMod { - color: black; -} - -.RktOpt { - color: black; -} - -.RktKw { - color: black; - /* font-weight: bold; */ -} - -.RktErr { - color: red; - font-style: italic; -} - -.RktVar { - color: #262680; - font-style: italic; -} - -.RktSym { - color: #262680; -} - -.RktValLink { - text-decoration: none; - color: blue; -} - -.RktModLink { - text-decoration: none; - color: blue; -} - -.RktStxLink { - text-decoration: none; - color: black; - /* font-weight: bold; */ -} - -.RktRes { - color: #0000af; -} - -.RktOut { - color: #960096; -} - -.RktCmt { - color: #c2741f; -} - -.RktVal { - color: #228b22; -} - -/* ---------------------------------------- */ -/* Some inline styles */ - -.together { - width: 100%; -} - -.prototype, .argcontract, .RBoxed { - white-space: nowrap; -} - -.prototype td { - vertical-align: text-top; -} -.longprototype td { - vertical-align: bottom; -} - -.RktBlk { - white-space: inherit; - text-align: left; -} - -.RktBlk tr { - white-space: inherit; -} - -.RktBlk td { - vertical-align: baseline; - white-space: inherit; -} - -.argcontract td { - vertical-align: text-top; -} - -.highlighted { - background-color: #ddddff; -} - -.defmodule { - width: 100%; - background-color: #F5F5DC; -} - -.specgrammar { - float: right; -} - -.RBibliography td { - vertical-align: text-top; -} - -.leftindent { - margin-left: 1em; - margin-right: 0em; -} - -.insetpara { - margin-left: 1em; - margin-right: 1em; -} - -.Rfilebox { -} - -.Rfiletitle { - text-align: right; - margin: 0em 0em 0em 0em; -} - -.Rfilename { - border-top: 1px solid #6C8585; - border-right: 1px solid #6C8585; - padding-left: 0.5em; - padding-right: 0.5em; - background-color: #ECF5F5; -} - -.Rfilecontent { - margin: 0em 0em 0em 0em; -} - -/* ---------------------------------------- */ -/* For background labels */ - -.RBackgroundLabel { - float: right; - width: 0px; - height: 0px; -} - -.RBackgroundLabelInner { - position: relative; - width: 25em; - left: -25.5em; - top: 0px; - text-align: right; - color: white; - z-index: 0; - font-weight: bold; -} - -.RForeground { - position: relative; - left: 0px; - top: 0px; - z-index: 1; -} diff --git a/arc/charterm/planet-docs/doc/scribble-common.js b/arc/charterm/planet-docs/doc/scribble-common.js deleted file mode 100644 index 00eec767..00000000 --- a/arc/charterm/planet-docs/doc/scribble-common.js +++ /dev/null @@ -1,153 +0,0 @@ -// Common functionality for PLT documentation pages - -// Page Parameters ------------------------------------------------------------ - -var page_query_string = - (location.href.search(/\?([^#]+)(?:#|$)/) >= 0) && RegExp.$1; - -var page_args = - ((function(){ - if (!page_query_string) return []; - var args = page_query_string.split(/[&;]/); - for (var i=0; i<args.length; i++) { - var a = args[i]; - var p = a.indexOf('='); - if (p >= 0) args[i] = [a.substring(0,p), a.substring(p+1)]; - else args[i] = [a, false]; - } - return args; - })()); - -function GetPageArg(key, def) { - for (var i=0; i<page_args.length; i++) - if (page_args[i][0] == key) return unescape(page_args[i][1]); - return def; -} - -function MergePageArgsIntoLink(a) { - if (page_args.length == 0 || - (!a.attributes["data-pltdoc"]) || (a.attributes["data-pltdoc"].value == "")) - return; - a.href.search(/^([^?#]*)(?:\?([^#]*))?(#.*)?$/); - if (RegExp.$2.length == 0) { - a.href = RegExp.$1 + "?" + page_query_string + RegExp.$3; - } else { - // need to merge here, precedence to arguments that exist in `a' - var i, j; - var prefix = RegExp.$1, str = RegExp.$2, suffix = RegExp.$3; - var args = str.split(/[&;]/); - for (i=0; i<args.length; i++) { - j = args[i].indexOf('='); - if (j) args[i] = args[i].substring(0,j); - } - var additions = ""; - for (i=0; i<page_args.length; i++) { - var exists = false; - for (j=0; j<args.length; j++) - if (args[j] == page_args[i][0]) { exists = true; break; } - if (!exists) str += "&" + page_args[i][0] + "=" + page_args[i][1]; - } - a.href = prefix + "?" + str + suffix; - } -} - -// Cookies -------------------------------------------------------------------- - -function GetCookie(key, def) { - var i, cookiestrs; - try { - if (document.cookie.length <= 0) return def; - cookiestrs = document.cookie.split(/; */); - } catch (e) { return def; } - for (i = 0; i < cookiestrs.length; i++) { - var cur = cookiestrs[i]; - var eql = cur.indexOf('='); - if (eql >= 0 && cur.substring(0,eql) == key) - return unescape(cur.substring(eql+1)); - } - return def; -} - -function SetCookie(key, val) { - var d = new Date(); - d.setTime(d.getTime()+(365*24*60*60*1000)); - try { - document.cookie = - key + "=" + escape(val) + "; expires="+ d.toGMTString() + "; path=/"; - } catch (e) {} -} - -// note that this always stores a directory name, ending with a "/" -function SetPLTRoot(ver, relative) { - var root = location.protocol + "//" + location.host - + NormalizePath(location.pathname.replace(/[^\/]*$/, relative)); - SetCookie("PLT_Root."+ver, root); -} - -// adding index.html works because of the above -function GotoPLTRoot(ver, relative) { - var u = GetCookie("PLT_Root."+ver, null); - if (u == null) return true; // no cookie: use plain up link - // the relative path is optional, default goes to the toplevel start page - if (!relative) relative = "index.html"; - location = u + relative; - return false; -} - -// Utilities ------------------------------------------------------------------ - -var normalize_rxs = [/\/\/+/g, /\/\.(\/|$)/, /\/[^\/]*\/\.\.(\/|$)/]; -function NormalizePath(path) { - var tmp, i; - for (i = 0; i < normalize_rxs.length; i++) - while ((tmp = path.replace(normalize_rxs[i], "/")) != path) path = tmp; - return path; -} - -// `noscript' is problematic in some browsers (always renders as a -// block), use this hack instead (does not always work!) -// document.write("<style>mynoscript { display:none; }</style>"); - -// Interactions --------------------------------------------------------------- - -function DoSearchKey(event, field, ver, top_path) { - var val = field.value; - if (event && event.keyCode == 13) { - var u = GetCookie("PLT_Root."+ver, null); - if (u == null) u = top_path; // default: go to the top path - u += "search/index.html?q=" + escape(val); - if (page_query_string) u += "&" + page_query_string; - location = u; - return false; - } - return true; -} - -function TocviewToggle(glyph, id) { - var s = document.getElementById(id).style; - var expand = s.display == "none"; - s.display = expand ? "block" : "none"; - glyph.innerHTML = expand ? "▼" : "►"; -} - -// Page Init ------------------------------------------------------------------ - -// Note: could make a function that inspects and uses window.onload to chain to -// a previous one, but this file needs to be required first anyway, since it -// contains utilities for all other files. -var on_load_funcs = []; -function AddOnLoad(fun) { on_load_funcs.push(fun); } -window.onload = function() { - for (var i=0; i<on_load_funcs.length; i++) on_load_funcs[i](); -}; - -AddOnLoad(function(){ - var links = document.getElementsByTagName("a"); - for (var i=0; i<links.length; i++) MergePageArgsIntoLink(links[i]); - var label = GetPageArg("ctxtname",false); - if (!label) return; - var indicator = document.getElementById("contextindicator"); - if (!indicator) return; - indicator.innerHTML = label; - indicator.style.display = "block"; - }); diff --git a/arc/charterm/planet-docs/doc/scribble-style.css b/arc/charterm/planet-docs/doc/scribble-style.css deleted file mode 100644 index e69de29b..00000000 --- a/arc/charterm/planet-docs/doc/scribble-style.css +++ /dev/null diff --git a/arc/charterm/planet-docs/doc/scribble.css b/arc/charterm/planet-docs/doc/scribble.css deleted file mode 100644 index d521d28f..00000000 --- a/arc/charterm/planet-docs/doc/scribble.css +++ /dev/null @@ -1,487 +0,0 @@ - -/* CSS seems backward: List all the classes for which we want a - particular font, so that the font can be changed in one place. (It - would be nicer to reference a font definition from all the places - that we want it.) - - As you read the rest of the file, remember to double-check here to - see if any font is set. */ - -/* Monospace: */ -.maincolumn, .refpara, .refelem, .tocset, .stt, .hspace, .refparaleft, .refelemleft { - font-family: monospace; -} - -/* Serif: */ -.main, .refcontent, .tocview, .tocsub, i { - font-family: serif; -} - -/* Sans-serif: */ -.version, .versionNoNav { - font-family: sans-serif; -} - -/* ---------------------------------------- */ - -p, .SIntrapara { - display: block; - margin: 1em 0; -} - -h2 { /* per-page main title */ - margin-top: 0; -} - -h3, h4, h5, h6, h7, h8 { - margin-top: 1.75em; - margin-bottom: 0.5em; -} - -.SSubSubSubSection { - font-weight: bold; - font-size: 0.83em; /* should match h5; from HTML 4 reference */ -} - -/* Needed for browsers like Opera, and eventually for HTML 4 conformance. - This means that multiple paragraphs in a table element do not have a space - between them. */ -table p { - margin-top: 0; - margin-bottom: 0; -} - -/* ---------------------------------------- */ -/* Main */ - -body { - color: black; - background-color: #ffffff; -} - -table td { - padding-left: 0; - padding-right: 0; -} - -.maincolumn { - width: 43em; - margin-right: -40em; - margin-left: 15em; -} - -.main { - text-align: left; -} - -/* ---------------------------------------- */ -/* Navigation */ - -.navsettop, .navsetbottom { - background-color: #f0f0e0; - padding: 0.25em 0 0.25em 0; -} - -.navsettop { - margin-bottom: 1.5em; - border-bottom: 2px solid #e0e0c0; -} - -.navsetbottom { - margin-top: 2em; - border-top: 2px solid #e0e0c0; -} - -.navleft { - margin-left: 1ex; - position: relative; - float: left; - white-space: nowrap; -} -.navright { - margin-right: 1ex; - position: relative; - float: right; - white-space: nowrap; -} -.nonavigation { - color: #e0e0e0; -} - -.searchform { - display: inline; - margin: 0; - padding: 0; -} - -.searchbox { - width: 16em; - margin: 0px; - padding: 0px; - background-color: #eee; - border: 1px solid #ddd; - text-align: center; - vertical-align: middle; -} - -#contextindicator { - position: fixed; - background-color: #c6f; - color: #000; - font-family: monospace; - font-weight: bold; - padding: 2px 10px; - display: none; - right: 0; - bottom: 0; -} - -/* ---------------------------------------- */ -/* Version */ - -.versionbox { - position: relative; - float: right; - left: 2em; - height: 0em; - width: 13em; - margin: 0em -13em 0em 0em; -} -.version { - font-size: small; -} -.versionNoNav { - font-size: xx-small; /* avoid overlap with author */ -} - -.version:before, .versionNoNav:before { - content: "Version "; -} - -/* ---------------------------------------- */ -/* Margin notes */ - -.refpara, .refelem { - position: relative; - float: right; - left: 2em; - height: 0em; - width: 13em; - margin: 0em -13em 0em 0em; -} - -.refpara, .refparaleft { - top: -1em; -} - -.refcolumn { - background-color: #F5F5DC; - display: block; - position: relative; - width: 13em; - font-size: 85%; - border: 0.5em solid #F5F5DC; - margin: 0 0 0 0; -} - -.refcontent { - margin: 0 0 0 0; -} - -.refcontent p { - margin-top: 0; - margin-bottom: 0; -} - -.refparaleft { - position: relative; - float: left; - right: 2em; - height: 0em; - width: 13em; - margin: 0em 0em 0em -13em; -} - -.refcolumnleft, .refelemleft { - background-color: #F5F5DC; - display: block; - position: relative; - width: 13em; - font-size: 85%; - border: 0.5em solid #F5F5DC; - margin: 0 0 0 0; -} - - -/* ---------------------------------------- */ -/* Table of contents, inline */ - -.toclink { - text-decoration: none; - color: blue; - font-size: 85%; -} - -.toptoclink { - text-decoration: none; - color: blue; - font-weight: bold; -} - -/* ---------------------------------------- */ -/* Table of contents, left margin */ - -.tocset { - position: relative; - float: left; - width: 12.5em; - margin-right: 2em; -} -.tocset td { - vertical-align: text-top; -} - -.tocview { - text-align: left; - background-color: #f0f0e0; -} - -.tocsub { - text-align: left; - margin-top: 0.5em; - background-color: #f0f0e0; -} - -.tocviewlist, .tocsublist { - margin-left: 0.2em; - margin-right: 0.2em; - padding-top: 0.2em; - padding-bottom: 0.2em; -} -.tocviewlist table { - font-size: 82%; -} - -.tocviewsublist, .tocviewsublistonly, .tocviewsublisttop, .tocviewsublistbottom { - margin-left: 0.4em; - border-left: 1px solid #bbf; - padding-left: 0.8em; -} -.tocviewsublist { - margin-bottom: 1em; -} -.tocviewsublist table, -.tocviewsublistonly table, -.tocviewsublisttop table, -.tocviewsublistbottom table { - font-size: 75%; -} - -.tocviewtitle * { - font-weight: bold; -} - -.tocviewlink { - text-decoration: none; - color: blue; -} - -.tocviewselflink { - text-decoration: underline; - color: blue; -} - -.tocviewtoggle { - text-decoration: none; - color: blue; - font-size: 75%; /* looks better, and avoids bounce when toggling sub-sections due to font alignments */ -} - -.tocsublist td { - padding-left: 1em; - text-indent: -1em; -} - -.tocsublinknumber { - font-size: 82%; -} - -.tocsublink { - font-size: 82%; - text-decoration: none; -} - -.tocsubseclink { - font-size: 82%; - text-decoration: none; -} - -.tocsubnonseclink { - font-size: 82%; - text-decoration: none; - padding-left: 0.5em; -} - -.tocsubtitle { - font-size: 82%; - font-style: italic; - margin: 0.2em; -} - -.sepspace { - font-size: 40%; -} - -.septitle { - font-size: 70%; -} - -/* ---------------------------------------- */ -/* Some inline styles */ - -.indexlink { - text-decoration: none; -} - -.nobreak { - white-space: nowrap; -} - -.stt { -} - -.title { - font-size: 200%; - font-weight: normal; - margin-top: 2.8em; - text-align: center; -} - -pre { margin-left: 2em; } -blockquote { margin-left: 2em; } - -ol { list-style-type: decimal; } -ol ol { list-style-type: lower-alpha; } -ol ol ol { list-style-type: lower-roman; } -ol ol ol ol { list-style-type: upper-alpha; } - -i { -} - -.SCodeFlow { - display: block; - margin-left: 1em; - margin-bottom: 0em; - margin-right: 1em; - margin-top: 0em; - white-space: nowrap; -} - -.SVInsetFlow { - display: block; - margin-left: 0em; - margin-bottom: 0em; - margin-right: 0em; - margin-top: 0em; -} - -.SubFlow { - display: block; - margin: 0em; -} - -.boxed { - width: 100%; - background-color: #E8E8FF; -} - -.hspace { -} - -.slant { - font-style: oblique; -} - -.badlink { - text-decoration: underline; - color: red; -} - -.plainlink { - text-decoration: none; - color: blue; -} - -.techoutside { text-decoration: underline; color: #b0b0b0; } -.techoutside:hover { text-decoration: underline; color: blue; } - -/* .techinside:hover doesn't work with FF, .techinside:hover> - .techinside doesn't work with IE, so use both (and IE doesn't - work with inherit in the second one, so use blue directly) */ -.techinside { color: black; } -.techinside:hover { color: blue; } -.techoutside:hover>.techinside { color: inherit; } - -.SCentered { - text-align: center; -} - -.imageleft { - float: left; - margin-right: 0.3em; -} - -.Smaller{ - font-size: 82%; -} - -.Larger{ - font-size: 122%; -} - -/* A hack, inserted to break some Scheme ids: */ -.mywbr { - width: 0; - font-size: 1px; -} - -.compact li p { - margin: 0em; - padding: 0em; -} - -.noborder img { - border: 0; -} - -.SAuthorListBox { - position: relative; - float: right; - left: 2em; - top: -2.5em; - height: 0em; - width: 13em; - margin: 0em -13em 0em 0em; -} -.SAuthorList { - font-size: 82%; -} -.SAuthorList:before { - content: "by "; -} -.author { - display: inline; - white-space: nowrap; -} - -/* print styles : hide the navigation elements */ -@media print { - .tocset, - .navsettop, - .navsetbottom { display: none; } - .maincolumn { - width: auto; - margin-right: 13em; - margin-left: 0; - } -} |