|
|
|
@ -156,7 +156,7 @@ class TermScreen { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
this.canvas.addEventListener('mousedown', e => { |
|
|
|
|
if (this.selection.selectable || e.altKey) { |
|
|
|
|
if ((this.selection.selectable || e.altKey) && e.button === 0) { |
|
|
|
|
selectStart(e.offsetX, e.offsetY) |
|
|
|
|
} else { |
|
|
|
|
Input.onMouseDown(...this.screenToGrid(e.offsetX, e.offsetY), |
|
|
|
@ -272,8 +272,11 @@ class TermScreen { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.canvas.addEventListener('contextmenu', e => { |
|
|
|
|
// prevent mouse keys getting stuck
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
if (this.mouseMode.clicks) { |
|
|
|
|
// prevent mouse keys getting stuck
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
} |
|
|
|
|
selectEnd(e.offsetX, e.offsetY); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
// bind ctrl+shift+c to copy
|
|
|
|
|