input: support AltGraph as a third level shift modifier

This commit is contained in:
Eugene Pankov
2021-08-25 21:48:25 +02:00
parent a706e010f4
commit fa9126c4e6
+3 -2
View File
@@ -1090,10 +1090,11 @@ export class Terminal extends CoreTerminal implements ITerminal {
this._keyDownHandled = true; this._keyDownHandled = true;
} }
private _isThirdLevelShift(browser: IBrowser, ev: IKeyboardEvent): boolean { private _isThirdLevelShift(browser: IBrowser, ev: KeyboardEvent): boolean {
const thirdLevelKey = const thirdLevelKey =
(browser.isMac && !this.options.macOptionIsMeta && ev.altKey && !ev.ctrlKey && !ev.metaKey) || (browser.isMac && !this.options.macOptionIsMeta && ev.altKey && !ev.ctrlKey && !ev.metaKey) ||
(browser.isWindows && ev.altKey && ev.ctrlKey && !ev.metaKey); (browser.isWindows && ev.altKey && ev.ctrlKey && !ev.metaKey) ||
(browser.isWindows && ev.getModifierState('AltGraph'));
if (ev.type === 'keypress') { if (ev.type === 'keypress') {
return thirdLevelKey; return thirdLevelKey;