Change decset flag to altEscMode

This commit is contained in:
kumaran-14
2020-02-20 00:21:33 +05:30
parent b75ae0f7b1
commit 5896a05ca6
6 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -1789,7 +1789,7 @@ export class InputHandler extends Disposable implements IInputHandler {
this._coreService.isCursorHidden = false; this._coreService.isCursorHidden = false;
break; break;
case 1039: case 1039:
this._coreService.decPrivateModes.altEnterMode = true; this._coreService.decPrivateModes.altEscMode = true;
break; break;
case 1048: // alt screen cursor case 1048: // alt screen cursor
this.saveCursor(); this.saveCursor();
@@ -2007,7 +2007,7 @@ export class InputHandler extends Disposable implements IInputHandler {
this._coreService.isCursorHidden = true; this._coreService.isCursorHidden = true;
break; break;
case 1039: case 1039:
this._coreService.decPrivateModes.altEnterMode = false; this._coreService.decPrivateModes.altEscMode = false;
break; break;
case 1048: // alt screen cursor case 1048: // alt screen cursor
this.restoreCursor(); this.restoreCursor();
+1 -1
View File
@@ -1222,7 +1222,7 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
return false; return false;
} }
const result = evaluateKeyboardEvent(event, this._coreService.decPrivateModes.altEnterMode, this._coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta); const result = evaluateKeyboardEvent(event, this._coreService.decPrivateModes.altEscMode, this._coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta);
this.updateCursorStyle(event); this.updateCursorStyle(event);
+1 -1
View File
@@ -59,7 +59,7 @@ export class MockCoreService implements ICoreService {
isCursorHidden: boolean = false; isCursorHidden: boolean = false;
isFocused: boolean = false; isFocused: boolean = false;
decPrivateModes: IDecPrivateModes = { decPrivateModes: IDecPrivateModes = {
altEnterMode: true, altEscMode: true,
applicationCursorKeys: false, applicationCursorKeys: false,
applicationKeypad: false, applicationKeypad: false,
origin: false, origin: false,
+1 -1
View File
@@ -152,7 +152,7 @@ export interface IMarker extends IDisposable {
} }
export interface IDecPrivateModes { export interface IDecPrivateModes {
altEnterMode: boolean; altEscMode: boolean;
applicationCursorKeys: boolean; applicationCursorKeys: boolean;
applicationKeypad: boolean; applicationKeypad: boolean;
origin: boolean; origin: boolean;
+2 -2
View File
@@ -37,7 +37,7 @@ const KEYCODE_KEY_MAPPINGS: { [key: number]: [string, string]} = {
export function evaluateKeyboardEvent( export function evaluateKeyboardEvent(
ev: IKeyboardEvent, ev: IKeyboardEvent,
altEnterMode: boolean, altEscMode: boolean,
applicationCursorMode: boolean, applicationCursorMode: boolean,
isMac: boolean, isMac: boolean,
macOptionIsMeta: boolean macOptionIsMeta: boolean
@@ -104,7 +104,7 @@ export function evaluateKeyboardEvent(
break; break;
case 13: case 13:
// return/enter // return/enter
if (altEnterMode && modifiers === 2) { if (altEscMode && modifiers === 2) {
result.key = C0.ESC + C0.CR; result.key = C0.ESC + C0.CR;
} }
else { else {
+1 -1
View File
@@ -9,7 +9,7 @@ import { IDecPrivateModes, ICharset } from 'common/Types';
import { clone } from 'common/Clone'; import { clone } from 'common/Clone';
const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({ const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({
altEnterMode: true, altEscMode: true,
applicationCursorKeys: false, applicationCursorKeys: false,
applicationKeypad: false, applicationKeypad: false,
origin: false, origin: false,