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;
break;
case 1039:
this._coreService.decPrivateModes.altEnterMode = true;
this._coreService.decPrivateModes.altEscMode = true;
break;
case 1048: // alt screen cursor
this.saveCursor();
@@ -2007,7 +2007,7 @@ export class InputHandler extends Disposable implements IInputHandler {
this._coreService.isCursorHidden = true;
break;
case 1039:
this._coreService.decPrivateModes.altEnterMode = false;
this._coreService.decPrivateModes.altEscMode = false;
break;
case 1048: // alt screen cursor
this.restoreCursor();
+1 -1
View File
@@ -1222,7 +1222,7 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
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);
+1 -1
View File
@@ -59,7 +59,7 @@ export class MockCoreService implements ICoreService {
isCursorHidden: boolean = false;
isFocused: boolean = false;
decPrivateModes: IDecPrivateModes = {
altEnterMode: true,
altEscMode: true,
applicationCursorKeys: false,
applicationKeypad: false,
origin: false,
+1 -1
View File
@@ -152,7 +152,7 @@ export interface IMarker extends IDisposable {
}
export interface IDecPrivateModes {
altEnterMode: boolean;
altEscMode: boolean;
applicationCursorKeys: boolean;
applicationKeypad: boolean;
origin: boolean;
+2 -2
View File
@@ -37,7 +37,7 @@ const KEYCODE_KEY_MAPPINGS: { [key: number]: [string, string]} = {
export function evaluateKeyboardEvent(
ev: IKeyboardEvent,
altEnterMode: boolean,
altEscMode: boolean,
applicationCursorMode: boolean,
isMac: boolean,
macOptionIsMeta: boolean
@@ -104,7 +104,7 @@ export function evaluateKeyboardEvent(
break;
case 13:
// return/enter
if (altEnterMode && modifiers === 2) {
if (altEscMode && modifiers === 2) {
result.key = C0.ESC + C0.CR;
}
else {
+1 -1
View File
@@ -9,7 +9,7 @@ import { IDecPrivateModes, ICharset } from 'common/Types';
import { clone } from 'common/Clone';
const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({
altEnterMode: true,
altEscMode: true,
applicationCursorKeys: false,
applicationKeypad: false,
origin: false,