Logo  

Home - Old Man Programmer

Displaying webapps/vt100/record//test//typescript

Script started on Sat 08 Jun 2019 11:35:45 AM EDT
water:/net/sbaker/public_html/vt100/record/test# cd ..

water:/net/sbaker/public_html/vt100/record# ls -la

total 16
drwxr-xr-x 3 root   root  4096 Jun  8 11:35 .
drwxr-xr-x 7 sbaker users 4096 Jun  8 11:32 ..
-rwxr-xr-x 1 root   root   186 Jun  8 11:35 recorder.sh
drwxr-xr-x 2 root   root  4096 Jun  8 11:35 test
water:/net/sbaker/public_html/vt100/record# cd ..

water:/net/sbaker/public_html/vt100# ls

audio  bench  doc  index.html  keyboard.js  player.js  record  script  vt100.js
water:/net/sbaker/public_html/vt100# jove keyboard.js 

"keyboard.js" 78 lines, 1858 characters.function type(e)
{ if (e.charCode) {var ch = String.fromCharCode(e.charCode);console.log(ch);terminal.addstr(ch);
  }
}var keymap = {
  ArrowUp : "\033[A", ArrowDown : "\033[B", ArrowRight : "\033[C", ArrowLeft: !
  Backspace : "\b", Tab : "\t", Escape : "\033"
};
function specialtype(e) {
  var k = keymap[e.key];
  if (k) {
//	console.log("special " + k);
    terminal.addstr(k);
    e.preventDefault();
  } elseconsole.log("uncaught: " + e.key); -3- "keyboard.js"   [keyboard.js] (11:36) (Text Fill)                         M*Dconsole.log(ch);console.log("uncaught: " + e.key);     console.log(ch);
 	 console.log(ch);
     console.log(ch);
    console.log(ch);

!!ype(e)
!!arCode) {
! = String.fromCharCode(e.charCode);
!e.log(ch);
!al.addstr(ch);
!!!! = {
!: "\033[A", ArrowDown : "\033[B", ArrowRight : "\033[C", ArrowLeft: "\033[D",
!e : "\b", Tab : "\t", Escape : "\033"
!!!pecialtype(e) {
!keymap[e.key];
!!ole.log("special " + k);
!al.addstr(k);
!entDefault();
!!e.log("uncaught: " + e.key);function type(e)
{  if (e.charCode) {
    var ch = String.fromCharCode(e.charCode);
    console.log(ch);
    terminal.addstr(ch);
  }
}var keymap = {
  ArrowUp : "\033[A", ArrowDown : "\033[B", ArrowRight : "\033[C", ArrowLeft: !
  Backspace : "\b", Tab : "\t", Escape : "\033"
};
function specialtype(e) {
  var k = keymap[e.key];
  if (k) {
//    console.log("special " + k);
    terminal.addstr(k);
    e.preventDefault();
  } else
    console.log("uncaught: " + e.key);De.stopPropagation();
D}DDfunction stopselect(e) {
Dwindow.alert("Stopping select");
De.preventDefault();
De.stopPropagation();
Dreturn false;
D}DDfunction docopy(e) {
Dconst selection = document.getSelection();
Dvar src = selection.toString();
Dvar dst = "";
Dfor(var i=0; i < src.length; i++) {
MM};
MBackspace : "\b", Tab : "\t", Escape : "\033"
MArrowUp : "\033[A", ArrowDown : "\033[B", ArrowRight : "\033[C", ArrowLeft: !
Mvar keymap = {
"keyboard.js"
water:/net/sbaker/public_html/vt100# vi m vt100.js 

[?1h="vt100.js" 435L, 11424Cvar terminal = {
  FGMASK: 15,
  BGMASK: 240,
  BOLD: 256,
  UNDERLINE     : 512,
  REVERSE: 1024,
  BLINK: 2048,

  colors : [
    "#000000", "#cd0000", "#00cd00", "#cdcd00", "#0000ee", "#cd00cd", "#00cdcd",, "#e5e5e5",
    "#7f7f7f", "#ff0000", "#00ff00", "#ffff00", "#5c5cff", "#ff00ff", "#00ffff",, "#ffffff"
  ],
  window : null, scrollback : null, tc : null,

  sc : null,
  m : null, row : null,
  // m: { e : col, char : " ", fg : this.fg, bg: this.bg };

  rows : 0, cols : 0,
  homeRow: 0, homeCol : 0,
  tmargin: 0, bmargin: 0,
  cx : 0, cy : 0,1,1Top~@k   2~@k   3~@k   4~@k   5~@k   6~@k   7~@k   8,0-1~@k   9,1  ~@k   10,1~@k   1~@k   2~@k   1~@k   0~@k   ~@k   2~@k   1~@k   1~@k   ~@k   2~@k   3~@k   4,0-1~@k   5,1  ~@k   6~@k   7~@k   8,0-1~@k   9,1  ~@k   20~@k   1~@k   2~@k   
cq : "", cqlen : 0,23,10%~@k   
24,0-10%~@k   
// Attributes:25,10%~@k   
fg : 7, bg : 0,26,10%~@k   
bold: false, underline: false, blink: false, reverse: false,27,11%~@k   
28,11%~@k   
enablescrollback : false,29,11%~@k   
sbbuffer : [],30,11%~@k   
sbtimer : null,31,12%~@k   

mode : 0,32,0-12%~@k   3,1  ~@k   

// 0 = normal, 1 = escape encountered:
  //   2 = [ encountered, 3 = [? encountered,34,12%~@k   5~@k   
//   4 = ) encountered, 5 = ( encountered36,12%~@k   
37,0-13%~@k   
sbupdate : function() {38,13%~@k   
for(var i = 0; i < terminal.sbbuffer.length; i++)39,13%~@k   
terminal.scrollback.appendChild(terminal.sbbuffer[i]);40,13%~@k   
terminal.sbbuffer = [];41,14%~@k   
terminal.sbtimer = null;42,14%~@k   
terminal.tc.scrollTop = terminal.tc.scrollHeight+30;43,14%~@k   
},44,14%~@k   
45,0-15%~@k   4,1  ~@k   3~@k   2~@k   1~@k   0~@k   39~@k   8~@k   7,0-1::q!
[?1l>water:/net/sbaker/public_html/vt100# set term=xterm

water:/net/sbaker/public_html/vt100# set term=xtermvim vt100.js

[?1000h[?1049h[?1h=�  ]11;?[?12;25h[?12l[?25h[?25l"vt100.js" 435L, 11424C[>cfg : 7, bg : 0,
  bold: false, underline: false, blink: false, reverse: false,

  enablescrollback : false,
  sbbuffer : [],
  sbtimer : null,

  mode : 0,
  // 0 = normal, 1 = escape encountered:
  //   2 = [ encountered, 3 = [? encountered,
  //   4 = ) encountered, 5 = ( encountered

  sbupdate : function() {
    for(var i = 0; i < terminal.sbbuffer.length; i++)terminal.scrollback.appendChild(terminal.sbbuffer[i]);
    terminal.sbbuffer = [];
    terminal.sbtimer = null;
    terminal.tc.scrollTop = terminal.tc.scrollHeight+30;
  },

  newrow : function(oldline) {
    var row = document.createElement("tr");
    var m = [];
    for(var c = 0; c < this.cols; c ++) {37,0-16%[?12l[?25h[?1000l[?1002h[?25l~@k   8,1  [?12l[?25h[?25l~@k   9[?12l[?25h[?25l~@k   40[?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   2[?12l[?25h[?25l~@k   3[?12l[?25h[?25l~@k   4[?12l[?25h[?25l~@k   5,0-1[?12l[?25h[?25l~@k   6,1  [?12l[?25h[?25l~@k   7[?12l[?25h[?25l~@k   8[?12l[?25h[?25l~@k   9[?12l[?25h[?25l~@k   
var col = document.createElement("td");50,16%[?12l[?25h[?25l~@k   
col.innerHTML = "&nbsp;";51,16%[?12l[?25h[?25l~@k   
if (oldline != undefined) {52,16%[?12l[?25h[?25l~@k   
m[c] = { e : col, char : " ", fg : oldline[c].fg, bg: oldline[c].bg};53,1-87%[?12l[?25h[?25l~@k   
} else {54,17%[?12l[?25h[?25l~@k   
m[c] = { e : col, char : " ", fg : this.fg, bg: this.bg };55,1-87%[?12l[?25h[?25l~@k   
}56,17%[?12l[?25h[?25l~@k   
this.setColor(m[c], m[c].fg, m[c].bg);57,18%[?12l[?25h[?25l~@k   
row.appendChild(col);58,18%[?12l[?25h[?25l~@k   
}59,18%[?12l[?25h[?25l~@k   
return { m: m, row: row };60,18%[?12l[?25h[?25l~@k   
},61,19%[?12l[?25h[?25l~@k   
scrollup : function() {62,19%[?12l[?25h[?25l~@k   
if (this.tmargin == 0 && this.enablescrollback) {63,19%[?12l[?25h[?25l~@k   
this.sbbuffer.push(this.row[0]);64,19%[?12l[?25h[?25l~@k   
if (this.sbtimer != null) clearTimeout(this.sbtimer);65,19%[?12l[?25h[?25l~@k   
this.sbtimer = setTimeout(this.sbupdate, 100);66,110%[?12l[?25h[?25l~@k   5[?12l[?25h[?25l~@k   4[?12l[?25h[?25l~@k   3[?12l[?25h[?25l~@k   2[?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   0[?12l[?25h[?25l~@k   59[?12l[?25h[?25l~@k   8[?12l[?25h[?25l~@k   7[?12l[?25h[?25l~@k   6[?12l[?25h[?25l~@k   5,1-8[?12l[?25h[?25l~@k   4,1  [?12l[?25h[?25l~@k   [?12l[?25h[?25l~@k   [?12l[?25h[?25l~@k   3,1-8[?12l[?25h[?25l~@k   2,1  [?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   0[?12l[?25h[?25l~@k   49[?12l[?25h[?25l~@k   8[?12l[?25h[?25l~@k   9[?12l[?25h[?25l~@k   50[?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   2[?12l[?25h[?25l~@k   3,1-8[?12l[?25h[?25l~@k   4,1  [?12l[?25h[?25l~@k   5,1-8[?12l[?25h[?25l~@k   6,1  [?12l[?25h[?25l~@k   7[?12l[?25h[?25l~@k   8[?12l[?25h[?25l~@k   9[?12l[?25h[?25l~@k   60[?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   2[?12l[?25h[?25l~@k   3[?12l[?25h[?25l~@k   4[?12l[?25h[?25l~@k   5[?12l[?25h[?25l~@k   6[?12l[?25h[?25l~@k   
}67,110%[?12l[?25h[?25l~@k   
this.window.removeChild(this.row[this.tmargin]);68,110%[?12l[?25h[?25l~@k   
69,0-110%[?12l[?25h[?25l~@k   
var nr = this.newrow();70,111%[?12l[?25h[?25l~@k   
for(var r = this.tmargin; r < this.bmargin; r++) {71,111%[?12l[?25h[?25l~@k   
this.m[r] = this.m[r+1];72,111%[?12l[?25h[?25l~@k   
this.row[r] = this.row[r+1];73,111%[?12l[?25h[?25l~@k   2[?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   0[?12l[?25h[?25l~@k   69,0-1[?12l[?25h[?25l~@k   8,1  [?12l[?25h[?25l~@k   7[?12l[?25h[?25l~@k   6[?12l[?25h[?25l~@k   5[?12l[?25h[?25l~@k   4[?12l[?25h[?25lA -- INSERT --64,3911%[?12l[?25h[?25l65,711%[?12l[?25h[?25l6[?12l[?25h[?25l5[?12l[?25h[?25l4[?12l[?25h[?25l3[?12l[?25h[?25l2[?12l[?25h[?25l1[?12l[?25h[?25l
this.sbbuffer.push(this.row[0]);this.row[r] = this.row[r+1];64,3911%[?12l[?25h[?25l5[?12l[?25h[?25l6[?12l[?25h[?25l{}7,6 [?12l[?25h[?25l{}6,39[?12l[?25h[?25l8[?12l[?25h[?25l7[?12l[?25h[?25l6[?12l[?25h[?25l5[?12l[?25h[?25l4[?12l[?25h[?25l()3[?12l[?25h[?25l()5[?12l[?25h[?25liclearTimeout(this.sbtimer);4[?12l[?25h[?25l clearTimeout(this.sbtimer);5[?12l[?25h[?25lclearTimeout(this.sbtimer);4[?12l[?25h[?25lclearTimeout(this.sbtimer);3[?12l[?25h[?25l clearTimeout(this.sbtimer);4[?12l[?25h[?25l clearTimeout(this.sbtimer);5[?12l[?25h[?25l clearTimeout(this.sbtimer);6[?12l[?25h[?25lclearTimeout(this.sbtimer);5[?12l[?25h[?25lclearTimeout(this.sbtimer);4[?12l[?25h[?25lclearTimeout(this.sbtimer);3[?12l[?25h[?25l()6[?12l[?25h[?25l{()
    }7,6 [?12l[?25h[?25l{}8,33[?12l[?25h[?25l9,1 [?12l[?25h[?25l70,28[?12l[?25h[?25l1,33[?12l[?25h[?25l2,31[?12l[?25h[?25l1,33[?12l[?25h[?25l0,28[?12l[?25h[?25l^[[?12l[?25h[?25l  70,2711%[?12l[?25h[?25l~@k   69,0-1[?12l[?25h[?25l~@k   70,27 [?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   2[?12l[?25h[?25l~@k   3[?12l[?25h[?25l~@k   
{}74,512%[?12l[?25h[?25l~@k   
{}
    this.m[this.bmargin] = nr.m;75,2712%[?12l[?25h[?25l~@k   
this.row[this.bmargin] = nr.row;76,2712%[?12l[?25h[?25l~@k   
if (this.bmargin == this.rows-1) {77,2712%[?12l[?25h[?25l~@k   
this.window.appendChild(nr.row);78,2713%[?12l[?25h[?25l~@k   
this.tc.scrollTop = this.tc.scrollHeight+30;79,2713%[?12l[?25h[?25l~@k   
} else80,1013%[?12l[?25h[?25l~@k   
this.window.insertBefore(nr.row, this.row[this.bmargin+1]);81,2713%[?12l[?25h[?25l~@k   
},82,414%[?12l[?25h[?25l~@k   
scrolldown : function() {83,2714%[?12l[?25h[?25l~@k   
var nr = this.newrow();84,2714%[?12l[?25h[?25l~@k   3[?12l[?25h[?25l~@k   2,4 [?12l[?25h[?25l~@k   1,27[?12l[?25h[?25l~@k   0,10[?12l[?25h[?25l~@k   [?12l[?25h[?25l~@k   79,27[?12l[?25h[?25l~@k   6[?12l[?25h[?25l~@k   8[?12l[?25h[?25l~@k   7[?12l[?25h[?25l~@k   [this.] 6[?12l[?25h[?25l~@k   [this.] 5[?12l[?25h[?25l~@k   {}4,5 [?12l[?25h[?25l~@k   [?12l[?25h[?25l~@k   {}3,26[?12l[?25h[?25l~@k   2[?12l[?25h[?25l~@k   1[?12l[?25h[?25l~@k   ()0[?12l[?25h[?25l~@k   ()69,0-1[?12l[?25h[?25li -- INSERT --69,114%[?12l[?25h[?25l70,514%[?12l[?25h[?25l/6[?12l[?25h[?25l//7[?12l[?25h[?25l 8[?12l[?25h[?25lT9[?12l[?25h[?25lh10[?12l[?25h[?25li1[?12l[?25h[?25ls2[?12l[?25h[?25l 3[?12l[?25h[?25li4[?12l[?25h[?25ls5[?12l[?25h[?25l 6[?12l[?25h[?25la7[?12l[?25h[?25l 8[?12l[?25h[?25lt9[?12l[?25h[?25le20[?12l[?25h[?25ls1[?12l[?25h[?25lt2[?12l[?25h[?25l.3[?12l[?25h[?25l.4[?12l[?25h[?25l.5[?12l[?25h[?25l 6[?12l[?25h[?25lH7[?12l[?25h[?25lo8[?12l[?25h[?25lp9[?12l[?25h[?25le30[?12l[?25h[?25lf1[?12l[?25h[?25lu2[?12l[?25h[?25ll3[?12l[?25h[?25ll4[?12l[?25h[?25ly5[?12l[?25h[?25l 6[?12l[?25h[?25li7[?12l[?25h[?25lt8[?12l[?25h[?25l 9[?12l[?25h[?25li40[?12l[?25h[?25ls1[?12l[?25h[?25l 2[?12l[?25h[?25la3[?12l[?25h[?25ll4[?12l[?25h[?25li5[?12l[?25h[?25lg6[?12l[?25h[?25ln7[?12l[?25h[?25le8[?12l[?25h[?25ld9[?12l[?25h[?25l 50[?12l[?25h[?25li1[?12l[?25h[?25ln2[?12l[?25h[?25l 3[?12l[?25h[?25lt4[?12l[?25h[?25li5[?12l[?25h[?25lm6[?12l[?25h[?25le7[?12l[?25h[?25l 8[?12l[?25h[?25lp9[?12l[?25h[?25lr60[?12l[?25h[?25lo1[?12l[?25h[?25lp2[?12l[?25h[?25le3[?12l[?25h[?25lr4[?12l[?25h[?25ll5[?12l[?25h[?25ly6[?12l[?25h[?25l.7[?12l[?25h[?25l^[[?12l[?25h[?25l  70,6614%[?12l[?25h[?25l::[?12l[?25hq!
[?25l[?1002l[?1l>[?12l[?25h[?1049lwater:/net/sbaker/public_html/vt100# ^Dexit

Script done on Sat 08 Jun 2019 11:37:31 AM EDT