From 790d578cc24527b1754fa1dd29289a28db76c3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Tue, 23 Feb 2016 23:18:12 +0100 Subject: [PATCH] 2016-02-23 23:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * shellinabox/vt100.jspp ! fixed key modifiers encoding. They should be calculated as bitfield for SHIFT = 1 ALT = 2 CTRL = 4 and then incremented by 1. ref: http://www.xfree86.org/4.7.0/ctlseqs.html#PC-Style%20Function%20Keys http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys --- shellinabox/vt100.jspp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp index 9c40371..c875592 100755 --- a/shellinabox/vt100.jspp +++ b/shellinabox/vt100.jspp @@ -2841,7 +2841,7 @@ VT100.prototype.handleKey = function(event) { ch = part1 + ((event.shiftKey ? 1 : 0) + (event.altKey|event.metaKey ? 2 : 0) + - (event.ctrlKey ? 4 : 0)) + + (event.ctrlKey ? 4 : 0) + 1) + part2; } else if (ch.length == 1 && (event.altKey || event.metaKey) && !this.disableAlt) {