Move applicationKeypad into core service
This commit is contained in:
+5
-5
@@ -1421,7 +1421,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
break;
|
||||
case 66:
|
||||
this._logService.debug('Serial port requested application keypad.');
|
||||
this._terminal.applicationKeypad = true;
|
||||
this._coreService.decPrivateModes.applicationKeypad = true;
|
||||
if (this._terminal.viewport) {
|
||||
this._terminal.viewport.syncScrollArea();
|
||||
}
|
||||
@@ -1604,7 +1604,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
break;
|
||||
case 66:
|
||||
this._logService.debug('Switching back to normal keypad.');
|
||||
this._terminal.applicationKeypad = false;
|
||||
this._coreService.decPrivateModes.applicationKeypad = false;
|
||||
if (this._terminal.viewport) {
|
||||
this._terminal.viewport.syncScrollArea();
|
||||
}
|
||||
@@ -1964,7 +1964,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
public softReset(params: IParams): void {
|
||||
this._coreService.isCursorHidden = false;
|
||||
this._terminal.insertMode = false;
|
||||
this._terminal.applicationKeypad = false; // ?
|
||||
this._coreService.decPrivateModes.applicationKeypad = false; // ?
|
||||
if (this._terminal.viewport) {
|
||||
this._terminal.viewport.syncScrollArea();
|
||||
}
|
||||
@@ -2086,7 +2086,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
*/
|
||||
public keypadApplicationMode(): void {
|
||||
this._logService.debug('Serial port requested application keypad.');
|
||||
this._terminal.applicationKeypad = true;
|
||||
this._coreService.decPrivateModes.applicationKeypad = true;
|
||||
if (this._terminal.viewport) {
|
||||
this._terminal.viewport.syncScrollArea();
|
||||
}
|
||||
@@ -2099,7 +2099,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
*/
|
||||
public keypadNumericMode(): void {
|
||||
this._logService.debug('Switching back to normal keypad.');
|
||||
this._terminal.applicationKeypad = false;
|
||||
this._coreService.decPrivateModes.applicationKeypad = false;
|
||||
if (this._terminal.viewport) {
|
||||
this._terminal.viewport.syncScrollArea();
|
||||
}
|
||||
|
||||
@@ -112,8 +112,6 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
|
||||
private _soundService: ISoundService;
|
||||
|
||||
// modes
|
||||
public applicationKeypad: boolean;
|
||||
public originMode: boolean;
|
||||
public insertMode: boolean;
|
||||
public bracketedPasteMode: boolean;
|
||||
|
||||
@@ -250,10 +248,7 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
|
||||
this._customKeyEventHandler = null;
|
||||
|
||||
// modes
|
||||
this.applicationKeypad = false;
|
||||
this.originMode = false;
|
||||
this.insertMode = false;
|
||||
// this._coreService.decPrivateModes.wraparound = true;
|
||||
this.bracketedPasteMode = false;
|
||||
|
||||
// charset
|
||||
|
||||
@@ -201,9 +201,6 @@ export class MockInputHandlingTerminal implements IInputHandlingTerminal {
|
||||
options: ITerminalOptions = {};
|
||||
cols: number;
|
||||
rows: number;
|
||||
applicationKeypad: boolean;
|
||||
applicationCursor: boolean;
|
||||
originMode: boolean;
|
||||
insertMode: boolean;
|
||||
bracketedPasteMode: boolean;
|
||||
curAttrData = new AttributeData();
|
||||
|
||||
Vendored
-1
@@ -25,7 +25,6 @@ export interface IInputHandlingTerminal {
|
||||
options: ITerminalOptions;
|
||||
cols: number;
|
||||
rows: number;
|
||||
applicationKeypad: boolean;
|
||||
insertMode: boolean;
|
||||
bracketedPasteMode: boolean;
|
||||
curAttrData: IAttributeData;
|
||||
|
||||
@@ -59,6 +59,7 @@ export class MockCoreService implements ICoreService {
|
||||
isFocused: boolean = false;
|
||||
decPrivateModes: IDecPrivateModes = {
|
||||
applicationCursorKeys: false,
|
||||
applicationKeypad: false,
|
||||
origin: false,
|
||||
wraparound: true
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -152,6 +152,7 @@ export interface IMarker extends IDisposable {
|
||||
|
||||
export interface IDecPrivateModes {
|
||||
applicationCursorKeys: boolean;
|
||||
applicationKeypad: boolean;
|
||||
origin: boolean;
|
||||
wraparound: boolean; // defaults: xterm - true, vt100 - false
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { clone } from 'common/Clone';
|
||||
|
||||
const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({
|
||||
applicationCursorKeys: false,
|
||||
applicationKeypad: false,
|
||||
origin: false,
|
||||
wraparound: true // defaults: xterm - true, vt100 - false
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user