Issues 39, 43, 166 and 172 commits applied to .jspp files
Autogenerated .js files with fixes were removed. Patches were taken from commits: *7d396c8273
*b7dac10ec1
*ea179e89f7
*b74ddd066b
This commit is contained in:
parent
7b7a844175
commit
6336e9f376
2 changed files with 46 additions and 15 deletions
|
@ -267,16 +267,16 @@ ShellInABox.prototype.keysPressed = function(ch) {
|
||||||
} else if (c < 0x10000) {
|
} else if (c < 0x10000) {
|
||||||
s += 'E' +
|
s += 'E' +
|
||||||
hex.charAt( (c >> 12) ) +
|
hex.charAt( (c >> 12) ) +
|
||||||
hex.charAt(0x8 + (c >> 10) & 0x3 ) +
|
hex.charAt(0x8 + ((c >> 10) & 0x3)) +
|
||||||
hex.charAt( (c >> 6) & 0xF ) +
|
hex.charAt( (c >> 6) & 0xF ) +
|
||||||
hex.charAt(0x8 + ((c >> 4) & 0x3)) +
|
hex.charAt(0x8 + ((c >> 4) & 0x3)) +
|
||||||
hex.charAt( c & 0xF );
|
hex.charAt( c & 0xF );
|
||||||
} else if (c < 0x110000) {
|
} else if (c < 0x110000) {
|
||||||
s += 'F' +
|
s += 'F' +
|
||||||
hex.charAt( (c >> 18) ) +
|
hex.charAt( (c >> 18) ) +
|
||||||
hex.charAt(0x8 + (c >> 16) & 0x3 ) +
|
hex.charAt(0x8 + ((c >> 16) & 0x3)) +
|
||||||
hex.charAt( (c >> 12) & 0xF ) +
|
hex.charAt( (c >> 12) & 0xF ) +
|
||||||
hex.charAt(0x8 + (c >> 10) & 0x3 ) +
|
hex.charAt(0x8 + ((c >> 10) & 0x3)) +
|
||||||
hex.charAt( (c >> 6) & 0xF ) +
|
hex.charAt( (c >> 6) & 0xF ) +
|
||||||
hex.charAt(0x8 + ((c >> 4) & 0x3)) +
|
hex.charAt(0x8 + ((c >> 4) & 0x3)) +
|
||||||
hex.charAt( c & 0xF );
|
hex.charAt( c & 0xF );
|
||||||
|
|
|
@ -887,7 +887,7 @@ VT100.prototype.initializeElements = function(container) {
|
||||||
'<div class="hidden">' +
|
'<div class="hidden">' +
|
||||||
'<div id="usercss"></div>' +
|
'<div id="usercss"></div>' +
|
||||||
'<pre><div><span id="space"></span></div></pre>' +
|
'<pre><div><span id="space"></span></div></pre>' +
|
||||||
'<input type="textfield" id="input" />' +
|
'<input type="textfield" id="input" autocorrect="off" autocapitalize="off" />' +
|
||||||
'<input type="textfield" id="cliphelper" />' +
|
'<input type="textfield" id="cliphelper" />' +
|
||||||
(typeof suppressAllAudio != 'undefined' &&
|
(typeof suppressAllAudio != 'undefined' &&
|
||||||
suppressAllAudio ? "" :
|
suppressAllAudio ? "" :
|
||||||
|
@ -1106,7 +1106,7 @@ VT100.prototype.repairElements = function(console) {
|
||||||
for (var span = line.firstChild; span; span = span.nextSibling) {
|
for (var span = line.firstChild; span; span = span.nextSibling) {
|
||||||
var newSpan = document.createElement(span.tagName);
|
var newSpan = document.createElement(span.tagName);
|
||||||
newSpan.style.cssText = span.style.cssText;
|
newSpan.style.cssText = span.style.cssText;
|
||||||
newSpan.style.className = span.style.className;
|
newSpan.className = span.className;
|
||||||
this.setTextContent(newSpan, this.getTextContent(span));
|
this.setTextContent(newSpan, this.getTextContent(span));
|
||||||
newLine.appendChild(newSpan);
|
newLine.appendChild(newSpan);
|
||||||
}
|
}
|
||||||
|
@ -1517,7 +1517,7 @@ VT100.prototype.insertBlankLine = function(y, color, style) {
|
||||||
line = document.createElement('div');
|
line = document.createElement('div');
|
||||||
var span = document.createElement('span');
|
var span = document.createElement('span');
|
||||||
span.style.cssText = style;
|
span.style.cssText = style;
|
||||||
span.style.className = color;
|
span.className = color;
|
||||||
this.setTextContent(span, this.spaces(this.terminalWidth));
|
this.setTextContent(span, this.spaces(this.terminalWidth));
|
||||||
line.appendChild(span);
|
line.appendChild(span);
|
||||||
}
|
}
|
||||||
|
@ -2321,6 +2321,13 @@ VT100.prototype.pasteFnc = function() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
VT100.prototype.pasteBrowserFnc = function() {
|
||||||
|
var clipboard = prompt("Paste into this box:","");
|
||||||
|
if (clipboard != undefined) {
|
||||||
|
return this.keysPressed('' + clipboard);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
VT100.prototype.toggleUTF = function() {
|
VT100.prototype.toggleUTF = function() {
|
||||||
this.utfEnabled = !this.utfEnabled;
|
this.utfEnabled = !this.utfEnabled;
|
||||||
|
|
||||||
|
@ -2426,6 +2433,7 @@ VT100.prototype.showContextMenu = function(x, y) {
|
||||||
'<ul id="menuentries">' +
|
'<ul id="menuentries">' +
|
||||||
'<li id="beginclipboard">Copy</li>' +
|
'<li id="beginclipboard">Copy</li>' +
|
||||||
'<li id="endclipboard">Paste</li>' +
|
'<li id="endclipboard">Paste</li>' +
|
||||||
|
'<li id="browserclipboard">Paste from browser</li>' +
|
||||||
'<hr />' +
|
'<hr />' +
|
||||||
'<li id="reset">Reset</li>' +
|
'<li id="reset">Reset</li>' +
|
||||||
'<hr />' +
|
'<hr />' +
|
||||||
|
@ -2467,7 +2475,7 @@ VT100.prototype.showContextMenu = function(x, y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actions for default items
|
// Actions for default items
|
||||||
var actions = [ this.copyLast, p, this.reset,
|
var actions = [ this.copyLast, p, this.pasteBrowserFnc, this.reset,
|
||||||
this.toggleUTF, this.toggleBell,
|
this.toggleUTF, this.toggleBell,
|
||||||
this.toggleSoftKeyboard,
|
this.toggleSoftKeyboard,
|
||||||
this.toggleCursorBlinking ];
|
this.toggleCursorBlinking ];
|
||||||
|
@ -2711,10 +2719,14 @@ VT100.prototype.handleKey = function(event) {
|
||||||
case 189: /* - */ ch = this.applyModifiers(45, event); break;
|
case 189: /* - */ ch = this.applyModifiers(45, event); break;
|
||||||
case 190: /* . */ ch = this.applyModifiers(46, event); break;
|
case 190: /* . */ ch = this.applyModifiers(46, event); break;
|
||||||
case 191: /* / */ ch = this.applyModifiers(47, event); break;
|
case 191: /* / */ ch = this.applyModifiers(47, event); break;
|
||||||
case 192: /* ` */ ch = this.applyModifiers(96, event); break;
|
// Conflicts with dead key " on Swiss keyboards
|
||||||
case 219: /* [ */ ch = this.applyModifiers(91, event); break;
|
//case 192: /* ` */ ch = this.applyModifiers(96, event); break;
|
||||||
|
// Conflicts with dead key " on Swiss keyboards
|
||||||
|
//case 219: /* [ */ ch = this.applyModifiers(91, event); break;
|
||||||
case 220: /* \ */ ch = this.applyModifiers(92, event); break;
|
case 220: /* \ */ ch = this.applyModifiers(92, event); break;
|
||||||
case 221: /* ] */ ch = this.applyModifiers(93, event); break;
|
// Conflicts with dead key ^ and ` on Swiss keaboards
|
||||||
|
// ^ and " on French keyboards
|
||||||
|
//case 221: /* ] */ ch = this.applyModifiers(93, event); break;
|
||||||
case 222: /* ' */ ch = this.applyModifiers(39, event); break;
|
case 222: /* ' */ ch = this.applyModifiers(39, event); break;
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
|
@ -2884,21 +2896,36 @@ VT100.prototype.keyDown = function(event) {
|
||||||
this.lastKeyDownEvent = undefined;
|
this.lastKeyDownEvent = undefined;
|
||||||
this.lastNormalKeyDownEvent = event;
|
this.lastNormalKeyDownEvent = event;
|
||||||
|
|
||||||
|
// Swiss keyboard conflicts:
|
||||||
|
// [ 59
|
||||||
|
// ] 192
|
||||||
|
// ' 219 (dead key)
|
||||||
|
// { 220
|
||||||
|
// ~ 221 (dead key)
|
||||||
|
// } 223
|
||||||
|
// French keyoard conflicts:
|
||||||
|
// ~ 50 (dead key)
|
||||||
|
// } 107
|
||||||
var asciiKey =
|
var asciiKey =
|
||||||
event.keyCode == 32 ||
|
event.keyCode == 32 ||
|
||||||
event.keyCode >= 48 && event.keyCode <= 57 ||
|
event.keyCode >= 48 && event.keyCode <= 57 ||
|
||||||
event.keyCode >= 65 && event.keyCode <= 90;
|
event.keyCode >= 65 && event.keyCode <= 90;
|
||||||
var alphNumKey =
|
var alphNumKey =
|
||||||
asciiKey ||
|
asciiKey ||
|
||||||
|
event.keyCode == 59 ||
|
||||||
event.keyCode >= 96 && event.keyCode <= 105 ||
|
event.keyCode >= 96 && event.keyCode <= 105 ||
|
||||||
|
event.keyCode == 107 ||
|
||||||
|
event.keyCode == 192 ||
|
||||||
|
event.keyCode >= 219 && event.keyCode <= 221 ||
|
||||||
|
event.keyCode == 223 ||
|
||||||
event.keyCode == 226;
|
event.keyCode == 226;
|
||||||
var normalKey =
|
var normalKey =
|
||||||
alphNumKey ||
|
alphNumKey ||
|
||||||
event.keyCode == 59 || event.keyCode == 61 ||
|
event.keyCode == 61 ||
|
||||||
event.keyCode == 106 || event.keyCode == 107 ||
|
event.keyCode == 106 ||
|
||||||
event.keyCode >= 109 && event.keyCode <= 111 ||
|
event.keyCode >= 109 && event.keyCode <= 111 ||
|
||||||
event.keyCode >= 186 && event.keyCode <= 192 ||
|
event.keyCode >= 186 && event.keyCode <= 191 ||
|
||||||
event.keyCode >= 219 && event.keyCode <= 223 ||
|
event.keyCode == 222 ||
|
||||||
event.keyCode == 252;
|
event.keyCode == 252;
|
||||||
try {
|
try {
|
||||||
if (navigator.appName == 'Konqueror') {
|
if (navigator.appName == 'Konqueror') {
|
||||||
|
@ -3026,10 +3053,14 @@ VT100.prototype.keyUp = function(event) {
|
||||||
this.catchModifiersEarly = true;
|
this.catchModifiersEarly = true;
|
||||||
var asciiKey =
|
var asciiKey =
|
||||||
event.keyCode == 32 ||
|
event.keyCode == 32 ||
|
||||||
event.keyCode >= 48 && event.keyCode <= 57 ||
|
// Conflicts with dead key ~ (code 50) on French keyboards
|
||||||
|
//event.keyCode >= 48 && event.keyCode <= 57 ||
|
||||||
|
event.keyCode >= 48 && event.keyCode <= 49 ||
|
||||||
|
event.keyCode >= 51 && event.keyCode <= 57 ||
|
||||||
event.keyCode >= 65 && event.keyCode <= 90;
|
event.keyCode >= 65 && event.keyCode <= 90;
|
||||||
var alphNumKey =
|
var alphNumKey =
|
||||||
asciiKey ||
|
asciiKey ||
|
||||||
|
event.keyCode == 50 ||
|
||||||
event.keyCode >= 96 && event.keyCode <= 105;
|
event.keyCode >= 96 && event.keyCode <= 105;
|
||||||
var normalKey =
|
var normalKey =
|
||||||
alphNumKey ||
|
alphNumKey ||
|
||||||
|
|
Loading…
Reference in a new issue