configurable button codes
This commit is contained in:
@@ -1679,7 +1679,7 @@ body.term #content {
|
||||
.ansiref.w100 {
|
||||
width: 100%; }
|
||||
.ansiref.w100 td:nth-child(1) {
|
||||
width: 6em; }
|
||||
width: 8em; }
|
||||
|
||||
.nomen {
|
||||
width: 100%; }
|
||||
@@ -1695,7 +1695,7 @@ body.term #content {
|
||||
line-height: 1; }
|
||||
.charset div {
|
||||
display: inline-block;
|
||||
width: 2.5em;
|
||||
width: 2.7em;
|
||||
border: 1px solid #666;
|
||||
height: 3em;
|
||||
margin: 1px;
|
||||
|
||||
+6
-1
@@ -1737,7 +1737,9 @@ var Screen = (function () {
|
||||
Input.onMouseUp(x, y, evt.button+1);
|
||||
});
|
||||
cOuter.addEventListener('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
if (Input.mouseTracksClicks()) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
});
|
||||
cOuter.addEventListener('mousewheel', function (evt) {
|
||||
Input.onMouseWheel(x, y, evt.deltaY>0?1:-1);
|
||||
@@ -2320,6 +2322,9 @@ var Input = (function() {
|
||||
Conn.send("p" + encode2B(y) + encode2B(x) + encode2B(b) + encode2B(m));
|
||||
// console.log("B ",b," M ",m);
|
||||
},
|
||||
mouseTracksClicks: function() {
|
||||
return opts.mt_click;
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
@@ -137,7 +137,9 @@ var Screen = (function () {
|
||||
Input.onMouseUp(x, y, evt.button+1);
|
||||
});
|
||||
cOuter.addEventListener('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
if (Input.mouseTracksClicks()) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
});
|
||||
cOuter.addEventListener('mousewheel', function (evt) {
|
||||
Input.onMouseWheel(x, y, evt.deltaY>0?1:-1);
|
||||
@@ -720,6 +722,9 @@ var Input = (function() {
|
||||
Conn.send("p" + encode2B(y) + encode2B(x) + encode2B(b) + encode2B(m));
|
||||
// console.log("B ",b," M ",m);
|
||||
},
|
||||
mouseTracksClicks: function() {
|
||||
return opts.mt_click;
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ return [
|
||||
'term.show_config_links' => 'Show nav links',
|
||||
'term.show_buttons' => 'Show buttons',
|
||||
'term.loopback' => 'Local Echo',
|
||||
'term.button_msgs' => 'Button codes<br>(ASCII, dec, CSV)',
|
||||
|
||||
// terminal color labels
|
||||
'color.0' => 'Black',
|
||||
|
||||
@@ -134,6 +134,15 @@
|
||||
<span class="mq-no-phone"> ms</span>
|
||||
</div>
|
||||
|
||||
<div class="Row">
|
||||
<label><?= tr("term.button_msgs") ?></label>
|
||||
<input class="short" type="text" name="bm1" id="bm1" value="%h:bm1%">
|
||||
<input class="short" type="text" name="bm2" id="bm2" value="%h:bm2%">
|
||||
<input class="short" type="text" name="bm3" id="bm3" value="%h:bm3%">
|
||||
<input class="short" type="text" name="bm4" id="bm4" value="%h:bm4%">
|
||||
<input class="short" type="text" name="bm5" id="bm5" value="%h:bm5%">
|
||||
</div>
|
||||
|
||||
<div class="Row checkbox" >
|
||||
<label><?= tr('term.fn_alt_mode') ?></label><!--
|
||||
--><span class="box" tabindex=0 role=checkbox></span>
|
||||
|
||||
@@ -34,24 +34,31 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>`\e]0;<i>title</i>\a`</td>
|
||||
<td>Set screen title (this is a standard OSC command)</td>
|
||||
<td>`\e]0;<i>t</i>\a`</td>
|
||||
<td>Set screen title to _t_ (this is a standard OSC command)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
\e]<i>81</i>;<i>btn1</i>\a \\
|
||||
\e]<i>82</i>;<i>btn2</i>\a \\
|
||||
\e]<i>83</i>;<i>btn3</i>\a \\
|
||||
\e]<i>84</i>;<i>btn4</i>\a \\
|
||||
\e]<i>85</i>;<i>btn5</i>\a \\
|
||||
\e]<i>80+n</i>;<i>t</i>\a
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
Set button 1-5 label - eg.`\e]81;Yes\a`
|
||||
Set label for button _n_ = 1-5 (code 81-85) to _t_ - e.g.`\e]81;Yes\a`
|
||||
sets the first button text to "Yes".
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
\e]<i>90+n</i>;<i>m</i>\a
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
Set message for button _n_ = 1-5 (code 81-85) to _m_ - e.g.`\e]94;iv\a`
|
||||
sets the 3rd button to send string "iv" when pressed.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
@@ -88,7 +95,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>`\e[8;<i>r</i>;<i>c</i>t`</td>
|
||||
<td>Set screen size (this is a command borrowed from xterm)</td>
|
||||
<td>Set screen size to _r_ rows and _c_ columns (this is a command borrowed from Xterm)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
console.error("Page load failed, refreshing…");
|
||||
location.reload(true);
|
||||
}
|
||||
}, 2000);
|
||||
}, 3000);
|
||||
</script>
|
||||
|
||||
<h1><!-- Screen title gets loaded here by JS --></h1>
|
||||
@@ -48,10 +48,10 @@
|
||||
});
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
console.error("Fail, reloading in 1s…");
|
||||
console.error("Fail, reloading in 3s…");
|
||||
setTimeout(function() {
|
||||
location.reload(true);
|
||||
}, 1000);
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
function toggleSoftKb(yes) {
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
width: 100%;
|
||||
|
||||
td:nth-child(1) {
|
||||
width: 6em;
|
||||
width: 8em;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
div {
|
||||
display: inline-block;
|
||||
width: 2.5em;
|
||||
width: 2.7em;
|
||||
border: 1px solid #666;
|
||||
height: 3em;
|
||||
margin: 1px;
|
||||
|
||||
Reference in New Issue
Block a user