handle a few extra escapes

This commit is contained in:
~d6 2023-02-02 16:32:01 -05:00
parent 1e30400f29
commit afe48d817e
1 changed files with 33 additions and 8 deletions

View File

@ -43,11 +43,18 @@
( reset bracketed paste mode (xterm): ESC [ ? 2004 l )
( )
( NOT SUPPORTED YET: )
( ??? ESC lpar )
( ??? ESC 7 )
( select G0 charset ($c) ESC lpar $c )
( save cursor ESC 7 )
( restore cursor ESC 7 )
( end alt charset ESC [ 10 m )
( end alt charset ESC [ 11 m )
( 1b [ ? 1000 h/l -> send mouse X & Y on button press and release (X11 xterm mouse protocol) )
( 1b [ ? 1002 h/l -> use cell motion mouse tracking, xterm )
( 1b [ ? 1006 h/l -> SGR mouse mode, xterm )
( 1b [ ? 1005 h/l -> UTF-8 mouse mode, xterm )
( 1b [ ? 1015 h/l -> urxvt Mouse mode )
|00 @System [ &vect $2 &expansion $2 &title $2 &metadata $2 &r $2 &g $2 &b $2 ]
|10 @Console [ &vect $2 &r $1 &pad $5 &w $1 ]
|20 @Screen [ &vect $2 &w $2 &h $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &px $1 &sprite $1 ]
@ -135,7 +142,7 @@
;on-read .Console/vect DEO2 ( set up stdin )
( set to 01 to enable debug log )
#00 .debug STZ
#01 .debug STZ
.debug LDZ ?&continue BRK &continue
#99 #010e DEO
@ -560,16 +567,34 @@
JMP2r
@on-read-esc ( -> )
.Console/r DEI LIT "[ EQU ?start-csi
.Console/r DEI debug-esc
.Console/r DEI
DUP LIT "[ EQU ?start-csi
DUP LIT "( EQU ?start-charset
DUP LIT ") EQU ?start-charset
DUP LIT "7 EQU ?&skip ( save cursor )
DUP LIT "8 EQU ?&skip ( restore cursor )
debug-esc
;on-read .Console/vect DEO2
!on-read
&skip POP ;on-read .Console/vect DEO2 BRK
@start-csi ( -> )
reset-args
;on-read-csi .Console/vect DEO2
@on-read-skip ( -> )
;on-read .Console/vect DEO2
BRK
( '(' = designate G0 charset )
( ')' = designate G1 charset )
( '*' = designate G2 charset )
( '+' = designate G3 charset )
@start-charset ( c^ -> )
POP ;on-read-skip .Console/vect DEO2 BRK
@start-g1-charset ( -> )
;on-read-skip .Console/vect DEO2 BRK
@start-csi ( c^ -> )
POP reset-args ;on-read-csi .Console/vect DEO2 BRK
@on-read
.Console/r DEI
DUP ?&ok POP BRK