Add support for modifiers for PageUp / PageDown keys.

This allows using Ctrl-PageUp/Down and Alt-PageUp/Down.
This commit is contained in:
Markus F.X.J. Oberhumer
2018-01-18 09:23:05 +01:00
parent 5888cd7938
commit 83921c0b26
+4
View File
@@ -1573,6 +1573,8 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
// page up
if (ev.shiftKey) {
result.scrollLines = -(this.rows - 1);
} else if (modifiers) {
result.key = C0.ESC + '[5;' + (modifiers + 1) + '~';
} else {
result.key = C0.ESC + '[5~';
}
@@ -1581,6 +1583,8 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
// page down
if (ev.shiftKey) {
result.scrollLines = this.rows - 1;
} else if (modifiers) {
result.key = C0.ESC + '[6;' + (modifiers + 1) + '~';
} else {
result.key = C0.ESC + '[6~';
}