把鼠标中键绑定为ESC

This commit is contained in:
YouWei Zhao 2017-12-20 12:59:38 +08:00
parent 633e248404
commit 99a9bdd327

View File

@ -224,6 +224,10 @@ document.ontouchstart = function() {
main.dom.data.onmousedown = function (e) {
try {
e.stopPropagation();
if(e.button==1){// 把鼠标中键绑定为ESC
core.keyUp(27);
return;
}
var loc = main.core.getClickLoc(e.clientX, e.clientY);
if (loc == null) return;
var x = parseInt(loc.x / loc.size), y = parseInt(loc.y / loc.size);