fixed macOptionIsMeta on macOS and added Alt-Shift-Letter key handling

This commit is contained in:
Eugene Pankov
2022-04-03 17:39:18 +02:00
parent dbd999c4a4
commit a32e3958d8
4 changed files with 25 additions and 3 deletions
+5 -2
View File
@@ -1096,14 +1096,17 @@ export class Terminal extends CoreTerminal implements ITerminal {
return false;
}
if (!this._compositionHelper!.keydown(event)) {
// Ignore composing with Alt key on Mac when macOptionIsMeta is enabled
const shouldIgnoreComposition = this.browser.isMac && this.options.macOptionIsMeta && event.altKey
if (!shouldIgnoreComposition && !this._compositionHelper!.keydown(event)) {
if (this.buffer.ybase !== this.buffer.ydisp) {
this._bufferService.scrollToBottom();
}
return false;
}
if (event.key === 'Dead' || event.key === 'AltGraph') {
if (!shouldIgnoreComposition && (event.key === 'Dead' || event.key === 'AltGraph')) {
this._unprocessedDeadKey = true;
}