configurable button codes

This commit is contained in:
2017-09-06 16:13:14 +02:00
parent a673843a63
commit 0af62f47e6
17 changed files with 186 additions and 1092 deletions
+6 -1
View File
@@ -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;
},
};
})();