use alt init/uninit, remove redundant escape/unescape API

This commit is contained in:
Yuki 2025-07-28 17:18:20 -04:00
parent bb3ae84444
commit f43d10cf7b
1 changed files with 12 additions and 13 deletions

View File

@ -332,23 +332,22 @@ export class Naplps extends EventEmitter {
this.pdiModeGr();
}
/**
* Switches terminal to graphics mode
*/
init() {
this.writeBytes(0x1b, 0x31);
this.writeBytes(0x1b, 0x22, 0x46);
}
uninit() {
return this.writeBytes(0x1b, 0x32);
}
escape() {
return this.writeBytes(0x1b, 0x25, 0x40);
}
unescape() {
//return this.writeBytes(0x1b, 0x31);
return this.writeBytes(0x1b, 0x25, 0x41);
}
/**
* Switches terminal back to text mode
*/
uninit() {
//return this.writeBytes(0x1b, 0x32);
return this.writeBytes(0x1b, 0x25, 0x40);
}
/**
* Shifts to text mode
*/