From aaa00551bfa30f9823b04e27efcfab5059661e8f Mon Sep 17 00:00:00 2001 From: KLuka Date: Tue, 17 Nov 2015 19:42:58 +0100 Subject: [PATCH] Issue #119, #312, #354: Soft keyboard icon * Added logic that enables soft keyboard icon by default on some clients like Kindle, PS Vita, iPad, ... --- shellinabox/vt100.jspp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp index c8c487a..2b2e227 100755 --- a/shellinabox/vt100.jspp +++ b/shellinabox/vt100.jspp @@ -297,6 +297,12 @@ VT100.prototype.getUserSettings = function() { this.disableAlt = true; } + // Enable soft keyboard icon on some clients by default. + if (navigator.userAgent.match(/iPad|iPhone|iPod/i) != null || + navigator.userAgent.match(/PlayStation Vita|Kindle/i) != null) { + this.softKeyboard = true; + } + if (this.visualBell) { this.signature = Math.floor(16807*this.signature + 1) % ((1 << 31) - 1);