mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Change decset flag to altEscMode
This commit is contained in:
+2
-2
@@ -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
@@ -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);
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Vendored
+1
-1
@@ -152,7 +152,7 @@ export interface IMarker extends IDisposable {
|
||||
}
|
||||
|
||||
export interface IDecPrivateModes {
|
||||
altEnterMode: boolean;
|
||||
altEscMode: boolean;
|
||||
applicationCursorKeys: boolean;
|
||||
applicationKeypad: boolean;
|
||||
origin: boolean;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user