@@ -1266,9 +1266,9 @@ function addVtButtons(): void {
12661266
12671267 const element = document . createElement ( 'button' ) ;
12681268 element . textContent = name ;
1269- writeCsi . split ( '' ) ;
1270- const prefix = writeCsi . length === 2 ? writeCsi [ 0 ] : '' ;
1271- const suffix = writeCsi [ writeCsi . length - 1 ] ;
1269+ const writeCsiSplit = writeCsi . split ( '| ' ) ;
1270+ const prefix = writeCsiSplit . length === 2 ? writeCsiSplit [ 0 ] : '' ;
1271+ const suffix = writeCsiSplit [ writeCsiSplit . length - 1 ] ;
12721272 element . addEventListener ( `click` , ( ) => term . write ( csi ( `${ prefix } ${ inputs . map ( e => e . value ) . join ( ';' ) } ${ suffix } ` ) ) ) ;
12731273
12741274 const desc = document . createElement ( 'span' ) ;
@@ -1281,22 +1281,23 @@ function addVtButtons(): void {
12811281 }
12821282 const vtFragment = document . createDocumentFragment ( ) ;
12831283 const buttonSpecs : { [ key : string ] : { label : string , description : string , paramCount ?: number } } = {
1284- A : { label : 'CUU ↑' , description : 'Cursor Up Ps Times' } ,
1285- B : { label : 'CUD ↓' , description : 'Cursor Down Ps Times' } ,
1286- C : { label : 'CUF →' , description : 'Cursor Forward Ps Times' } ,
1287- D : { label : 'CUB ←' , description : 'Cursor Backward Ps Times' } ,
1288- E : { label : 'CNL' , description : 'Cursor Next Line Ps Times' } ,
1289- F : { label : 'CPL' , description : 'Cursor Preceding Line Ps Times' } ,
1290- G : { label : 'CHA' , description : 'Cursor Character Absolute' } ,
1291- H : { label : 'CUP' , description : 'Cursor Position [row;column]' , paramCount : 2 } ,
1292- I : { label : 'CHT' , description : 'Cursor Forward Tabulation Ps tab stops' } ,
1293- J : { label : 'ED' , description : 'Erase in Display' } ,
1294- '?J' : { label : 'DECSED' , description : 'Erase in Display' } ,
1295- K : { label : 'EL' , description : 'Erase in Line' } ,
1296- '?K' : { label : 'DECSEL' , description : 'Erase in Line' } ,
1297- L : { label : 'IL' , description : 'Insert Ps Line(s)' } ,
1298- M : { label : 'DL' , description : 'Delete Ps Line(s)' } ,
1299- P : { label : 'DCH' , description : 'Delete Ps Character(s)' }
1284+ A : { label : 'CUU ↑' , description : 'Cursor Up Ps Times' } ,
1285+ B : { label : 'CUD ↓' , description : 'Cursor Down Ps Times' } ,
1286+ C : { label : 'CUF →' , description : 'Cursor Forward Ps Times' } ,
1287+ D : { label : 'CUB ←' , description : 'Cursor Backward Ps Times' } ,
1288+ E : { label : 'CNL' , description : 'Cursor Next Line Ps Times' } ,
1289+ F : { label : 'CPL' , description : 'Cursor Preceding Line Ps Times' } ,
1290+ G : { label : 'CHA' , description : 'Cursor Character Absolute' } ,
1291+ H : { label : 'CUP' , description : 'Cursor Position [row;column]' , paramCount : 2 } ,
1292+ I : { label : 'CHT' , description : 'Cursor Forward Tabulation Ps tab stops' } ,
1293+ J : { label : 'ED' , description : 'Erase in Display' } ,
1294+ '?|J' : { label : 'DECSED' , description : 'Erase in Display' } ,
1295+ K : { label : 'EL' , description : 'Erase in Line' } ,
1296+ '?|K' : { label : 'DECSEL' , description : 'Erase in Line' } ,
1297+ L : { label : 'IL' , description : 'Insert Ps Line(s)' } ,
1298+ M : { label : 'DL' , description : 'Delete Ps Line(s)' } ,
1299+ P : { label : 'DCH' , description : 'Delete Ps Character(s)' } ,
1300+ ' q' : { label : 'DECSCUSR' , description : 'Set Cursor Style' , paramCount : 1 }
13001301 } ;
13011302 for ( const s of Object . keys ( buttonSpecs ) ) {
13021303 const spec = buttonSpecs [ s ] ;
0 commit comments