diff --git a/app/PreprocessedTerminal.qml b/app/PreprocessedTerminal.qml index 77c9472..7a876bc 100644 --- a/app/PreprocessedTerminal.qml +++ b/app/PreprocessedTerminal.qml @@ -133,31 +133,25 @@ Item{ acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton anchors.fill: parent onWheel:{ - var coord = correctDistortion(wheel.x, wheel.y); - var lines = wheel.angleDelta.y > 0 ? -1 : 1; - kterminal.scrollWheelEvent(coord, lines); + if(wheel.modifiers & Qt.ControlModifier){ + wheel.angleDelta.y > 0 ? zoomIn.trigger() : zoomOut.trigger(); + } else { + var coord = correctDistortion(wheel.x, wheel.y); + var lines = wheel.angleDelta.y > 0 ? -1 : 1; + kterminal.scrollWheelEvent(coord, lines); + } } - //onClicked: { - // if (mouse.button == Qt.RightButton){ - // contextmenu.popup(); - // } else if (mouse.button == Qt.MiddleButton){ - // kterminal.pasteSelection(); - // } - //} onDoubleClicked: { var coord = correctDistortion(mouse.x, mouse.y); - console.log("Double click"); kterminal.mouseDoubleClickEvent(coord, mouse.button, mouse.modifiers); } - //onPositionChanged: { - // if (pressedButtons & Qt.LeftButton){ - // var coord = correctDistortion(mouse.x, mouse.y); - // kterminal.mouseMove(coord.width, coord.height); - // } - //} onPressed: { - var coord = correctDistortion(mouse.x, mouse.y); - kterminal.mousePressEvent(coord, mouse.button, mouse.modifiers) + if((!kterminal.usesMouse || mouse.modifiers & Qt.ShiftModifier) && mouse.button == Qt.RightButton) { + contextmenu.popup(); + } else { + var coord = correctDistortion(mouse.x, mouse.y); + kterminal.mousePressEvent(coord, mouse.button, mouse.modifiers) + } } onReleased: { var coord = correctDistortion(mouse.x, mouse.y); diff --git a/konsole-qml-plugin/src/TerminalDisplay.cpp b/konsole-qml-plugin/src/TerminalDisplay.cpp index 0d7e857..1b28e56 100644 --- a/konsole-qml-plugin/src/TerminalDisplay.cpp +++ b/konsole-qml-plugin/src/TerminalDisplay.cpp @@ -614,9 +614,7 @@ void KTerminalDisplay::mousePressEvent(QPoint position, int but, int mod) } else if (button == Qt::MidButton) { processMidButtonClick(position, modifiers); } else if (button == Qt::RightButton) { - if (_mouseMarks || (modifiers & Qt::ShiftModifier)) - ;//emit configureRequest(ev->pos()); - else + if (!_mouseMarks) emit mouseSignal(2, charColumn + 1, charLine + 1, 0); //emit mouseSignal(2, charColumn + 1, charLine + 1 + _scrollBar->value() - _scrollBar->maximum() , 0); }