From 83921c0b26874216ee9c28ebab8d523acf5ff63e Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Thu, 18 Jan 2018 09:23:05 +0100 Subject: [PATCH] Add support for modifiers for PageUp / PageDown keys. This allows using Ctrl-PageUp/Down and Alt-PageUp/Down. --- src/Terminal.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Terminal.ts b/src/Terminal.ts index f95cc0ea..6e4d1aa0 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -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~'; }